Normally, GCC does not warn about a second definition of a preprocessor macro with the exact same expansion: #define some_ordinary_macro 1 #define some_ordinary_macro 1 /* no diagnostic */ However, GCC 9 and 10 *do* complain about this kind of redefinition if the name of the macro begins with __STDC_: #define __STDC_anything 1 #define __STDC_anything 1 /* warning: "__STDC_anything" redefined */ In particular, it will complain about double definitions of the various __STDC_WANT_*__ macros. The upcoming autoconf 2.70 will start defining many of those macros when the script uses AC_USE_SYSTEM_EXTENSIONS, and this broke code in APR's configure script that included the internal 'confdefs.h' (which accumulates the various #defines that will be emitted into config.h) a second time (autoconf test programs always include confdefs.h before doing anything else) I think GCC should treat __STDC_ macros the same as ordinary macros - no warning for a second definition with the same expansion. N.B. clang already behaves this way. (If the second definition has a *different* expansion, GCC complains regardless of the macro's name, and that behavior should not be changed.)
For more information see Autoconf bug report <https://savannah.gnu.org/support/?110382> and APR pull request <https://github.com/apache/apr/pull/25>.
In bug 91451 I suggested changing this specifically for __STDC_WANT_*.
Rather than an ever-growing list of macros that need exempting from this rule, I would suggest flipping it around and only complaining about the "standard predefined" and "common predefined" macros (as the manual uses those terms).