Re: -fcond-mismatch option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ali hagigat <hagigatali@xxxxxxxxx> 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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux