https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108568
Bug ID: 108568 Summary: FAILs in 17_intro/names.cc Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- On gcc112 I'm seeing FAIL: 17_intro/names.cc (test for excess errors) FAIL: experimental/names.cc (test for excess errors) These are because glibc < 2.19 used __unused as field member of various structs, including mcontext_t in sys/ucontext.h on ppc64le. This was changed in glibc with https://gcc.gnu.org/pipermail/libc-alpha/2013-November/045766.html names.cc even has #ifdef __GLIBC_PREREQ #if ! __GLIBC_PREREQ(2, 19) // Glibc defines this prior to 2.19 #undef __unused #endif #endif for it, but it doesn't work. The reason is that __GLIBC_PREREQ is defined in <features.h> but nothing included that header before this spot (it is included later from bits/stdc++.h). Can't it use #if __GLIBC__ == 1 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 19) instead? Or just #if __GLIBC__ == 2 && __GLIBC_MINOR__ < 19 (because who knows what glibc 1 actually used, that was 1996 and already in 1997 we had glibc 2.x).