https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103650
Bug ID: 103650 Summary: [9/10/11/12 Regression] libstdc++ headers defined LT_OBJDIR and STDC_HEADERS Product: gcc Version: 11.2.1 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- #define LT_OBJDIR 99 #define STDC_HEADERS 99 #include <utility> #if LT_OBJDIR != 99 # error LT_OBJDIR redefined #endif #if STDC_HEADERS != 99 # error STDC_HEADERS redefined #endif In file included from /usr/include/c++/11/utility:68, from macros.C:3: macros.C:4:5: error: token "".libs/"" is not valid in preprocessor expressions 4 | #if LT_OBJDIR != 99 | ^~~~~~~~~ macros.C:8:3: error: #error STDC_HEADERS redefined 8 | # error STDC_HEADERS redefined | ^~~~~ With GCC 4.1 only STDC_HEADERS was defined: macros.C:8:3: error: #error STDC_HEADERS redefined So the definition of LT_OBJDIR in 4.3 and later (I can't check 4.2) is a regression. We never asked for those macros, this is libtool and autoconf being "helpful".