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

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2011-11-27 15:58:15 UTC ---
On Sun, 27 Nov 2011, tsoae at mail dot ru wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51316
> 
> --- Comment #2 from Nikolka <tsoae at mail dot ru> 2011-11-27 08:37:37 UTC ---
> > Note that this usage is not valid in C1X.
> 
> Could you explain?

See C1X 6.5.3.4 paragraph 1, "The _Alignof operator shall not be applied 
to a function type or an incomplete type.".  This is a constraint, so a 
diagnostic is required.  Thus, if C++ allows this case, the diagnostic 
(which is in code shared between C and C++) must be appropriately 
conditional on the language being compiled.

Reply via email to