https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85921

--- Comment #16 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Fri, 25 May 2018, msebor at gcc dot gnu.org wrote:

> Beyond that, #defining macros that match known attributes to something else
> seems like asking for trouble.  It even came up at the last WG14 meeting in 
> the
> context of the newly proposed C [[attributes]]: is something like
> 
>   #define deprecated "foobar"
>   #include <stdio.h>
> 
> a valid C (or C++) program?  (Should it be?)

Unless you change 7.1.2#4 "The program shall not have any macros with 
names lexically identical to keywords currently defined prior to the 
inclusion of the header or when any macro defined in the header is 
expanded.", it is.  It's possible that defining any attributes in the 
standard should mean also saying standard attributes alongside keywords 
there.

Reply via email to