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

--- Comment #19 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #18)
> I assume that testcase is meant to be C++ (because it isn't valid C) but
> it's not valid C++ either:
> 
> 17.6.4.3.1 [macro.names]
> "A translation unit that includes a header shall not contain any macros that
> define names declared or defined in that header. Nor shall such a
> translation unit define macros for names lexically identical to keywords."

This is exactly what G++'s stdbool.h is doing with -std=gnu++98 and -std=c++98.

(Also, why is this not an error with -std=c++11 -pedantic-errors?)

Reply via email to