Re: sizeof( function )

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

 



Nick Maclaren wrote:

> But this is actually a BUG in gcc - look at 5.1.1.3.  The restriction
> that sizeof may not have an argument that is function type is a
> constraint, and therefore a breach requires a diagnostic.

It would only be a bug if there was no diagnostic in non-GNU mode, e.g.
-std=c89.  Otherwise the default is -std=gnu89 if not specified and as
the other poster pointed out, GNU extensions allow this and define the
return value as 1 for convenience.

Brian

[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