On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: > diff --git a/gcc/testsuite/gcc.dg/c2x-predefined-macros.c > b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c > new file mode 100644 > index 00000000000..3456105563a > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c > @@ -0,0 +1,11 @@ > +/* Test C2X predefined macros. */ > +/* { dg-do compile } */ > +/* { dg-options "-std=c2x" } */ > + > +#if !defined(__CHAR8_TYPE__) > +# error __CHAR8_TYPE__ is not defined! > +#endif > + > +#if !defined(__GCC_ATOMIC_CHAR8_T_LOCK_FREE) > +# error __GCC_ATOMIC_CHAR8_T_LOCK_FREE is not defined! > +#endif
These aren't macros defined by C2X. You could argue that they are part of the stable interface provided by GCC for e.g. libc implementations to use, and so should be tested as such, but any such test shouldn't suggest it's testing a standard feature (and should have a better name to describe what it's actually testing rather than suggesting it's about predefined macros in general). -- Joseph S. Myers jos...@codesourcery.com