From: Ian Lance Taylor <iant@google.com>
To: ali hagigat <hagigatali@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: -fcond-mismatch option
Date: Sun, 20 Feb 2011 13:44:00 -0000 [thread overview]
Message-ID: <mcrfwri6cvh.fsf@google.com> (raw)
In-Reply-To: <AANLkTimUmiKvTRNXT-xECMH+prKbvezjEe9oPiC4enEQ@mail.gmail.com> (ali hagigat's message of "Sun, 20 Feb 2011 10:23:24 +0330")
ali hagigat <hagigatali@gmail.com> writes:
> "-fcond-mismatch
> Allow conditional expressions with mismatched types in the second and third
> arguments. The value of such an expression is void."
> Could any body give an example? What are the second and third
> arguments? How they are mismatched? How the conditional expression is
> written?
Here is an example which gives an error by default but can be compiled
if you use -fcond-mismatch.
struct s1 { int i; };
extern struct s1 f1();
extern char *f2();
void foo(int f) { f ? f1() : f2(); }
Ian
prev parent reply other threads:[~2011-02-20 13:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-20 7:31 ali hagigat
2011-02-20 13:44 ` Ian Lance Taylor [this message]
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=mcrfwri6cvh.fsf@google.com \
--to=iant@google.com \
--cc=gcc-help@gcc.gnu.org \
--cc=hagigatali@gmail.com \
/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).