http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46766

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-02 
15:14:14 UTC ---
(In reply to comment #0)
> 
> void f1(void)
> {
>   return (void)0; //OK

This is valid in C++ but allowing it in C is a GCC extension.


> void f2(void)
> {
>   return f1(); //OK

This is valid in C++ but allowing it in C is a GCC extension.


>   f1((void)0); //ERROR
>   f2(f1());    //ERROR

This is repulsive.

I don't see this as "more aligned" with the examples above, I see it as more
aligned with:

int i = (int) f1();   // EURGH

Or consider the following, how many arguments are given to f3?

   void f3(int);
   f3((void)0, f1(), f2(), 3);  // EURGH

Reply via email to