https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94753
Bug ID: 94753
Summary: -undef, c++20 and feature-test macros
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: r_new at rambler dot ru
Target Milestone: ---
In c++20 feature-test macros (__cpp_attributes, __cpp_constexpr, ...) are
standard predefined macros, must be predefined even with -undef.
g++ -undef -std=c++2a -E -dM -x c++ - < /dev/null
#define __STDC_HOSTED__ 1
#define __STDC_IEC_559__ 1
#define __STDC_ISO_10646__ 201706L
#define __STDC_UTF_16__ 1
#define __cplusplus 201709L
#define _STDC_PREDEF_H 1
#define __STDC_IEC_559_COMPLEX__ 1
#define __STDC_UTF_32__ 1
#define __STDC__ 1
#define _GNU_SOURCE 1
gcc version 10.0.1 20200423 (experimental) (Compiler-Explorer-Build) and gcc
version 9.3.0 (Arch Linux 9.3.0-1)