From: Yubin Ruan <ablacktshirt@gmail.com>
To: ccan@lists.ozlabs.org
Subject: useless expression in typesaft_cb_cast
Date: Mon, 12 Mar 2018 04:05:27 +0800 [thread overview]
Message-ID: <20180311200527.GF6146@HP> (raw)
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
next reply other threads:[~2018-03-11 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 20:05 Yubin Ruan [this message]
2018-03-13 9:49 ` useless expression in typesaft_cb_cast Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180311200527.GF6146@HP \
--to=ablacktshirt@gmail.com \
--cc=ccan@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).