Re: [PATCH] include: Fix -Wundef warnings in ansidecl.h

2021-07-23 Thread Jeff Law via Gcc-patches
On 7/20/2021 4:01 PM, Marek Polacek via Gcc-patches wrote: This quashes -Wundef warnings in ansidecl.h when compiled in C or C++. In C, __cpp_constexpr and __cplusplus aren't defined so we evaluate them to 0; conversely, __STDC_VERSION__ is not defined in C++. This has caused grief when

[PATCH] include: Fix -Wundef warnings in ansidecl.h

2021-07-20 Thread Marek Polacek via Gcc-patches
This quashes -Wundef warnings in ansidecl.h when compiled in C or C++. In C, __cpp_constexpr and __cplusplus aren't defined so we evaluate them to 0; conversely, __STDC_VERSION__ is not defined in C++. This has caused grief when -Wundef is used with -Werror. I've also tested -traditional-cpp.