public inbox for ccan@ozlabs.org
 help / color / mirror / Atom feed
* useless expression in typesaft_cb_cast
@ 2018-03-11 20:05 Yubin Ruan
  2018-03-13  9:49 ` Rusty Russell
  0 siblings, 1 reply; 2+ messages in thread
From: Yubin Ruan @ 2018-03-11 20:05 UTC (permalink / raw)
  To: ccan

Hi,

typesaft_cb_cast() is defined in typesaft_cb.h as:

    #define typesafe_cb_cast(desttype, oktype, expr)                  \
    	__builtin_choose_expr(                                        \
    		__builtin_types_compatible_p(__typeof__(0?(expr):(expr)), \
    					     oktype),                                 \
    		(desttype)(expr), (expr))

what is the point of that "0?(expr):(expr)" ?

Yubin
_______________________________________________
ccan mailing list
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-13  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-11 20:05 useless expression in typesaft_cb_cast Yubin Ruan
2018-03-13  9:49 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox