diff options
author | Marek Polacek <polacek@redhat.com> | 2021-07-20 16:26:28 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2021-07-24 12:51:00 -0400 |
commit | 34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3 (patch) | |
tree | 1474584ff46cac3fcd7cd344003edcc9e4e44f3a /gcc | |
parent | ead235f60139edc6eb408d8d083cbb15e417b447 (diff) | |
download | gcc-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3.zip gcc-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3.tar.gz gcc-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3.tar.bz2 |
include: Fix -Wundef warnings in ansidecl.h
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.
include/ChangeLog:
* ansidecl.h: Check if __cplusplus is defined before checking
the value of __cpp_constexpr and __cplusplus. Don't check
__STDC_VERSION__ in C++.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions