https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088

            Bug ID: 97088
           Summary: 17_intro/names.cc and experimental/names.cc fail with
                    --disable-libstdcxx-pch
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: clyon at gcc dot gnu.org
  Target Milestone: ---

When configuring gcc with --disable-libstdcxx-pch, two libstdc++ fail on arm
(linux and newlib targets) and aarch64 (with newlib).

For instance on arm-eabi (using newlib):
In file included from
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/thumb/v7ve+simd/hard/libstdc++-v3/include/cmath:45,
                 from
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/thumb/v7ve+simd/hard/libstdc++-v3/include/arm-none-eabi/bits/stdc++.h:41,
                 from /libstdc++-v3/testsuite/17_intro/names.cc:203:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:194:
error: expected ')' before ';' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:195:
error: expected ')' before ';' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:196:
error: expected ')' before ';' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:197:
error: expected ')' before ';' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:198:
error: expected ')' before ';' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:199:
error: expected ')' before ';' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:200:
error: expected ')' before ';' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-eabi/include/math.h:201:
error: expected ')' before ';' token

This happens because the testcase does
#define x (
and "x" is used as parameter names in several function prototypes in newlib's
math.h


Similarly for arm-linux-gnueabi (with glibc), I can see:
In file included from
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/sysroot-arm-none-linux-gnueabi/usr/include/signal.h:306,
                 from
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-linux-gnueabi/gcc3/arm-none-linux-gnueabi/libstdc++-v3/include/csignal:42,
                 from
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-linux-gnueabi/gcc3/arm-none-linux-gnueabi/libstdc++-v3/include/arm-none-linux-gnueabi/bits/stdc++.h:43,
                 from /libstdc++-v3/testsuite/17_intro/names.cc:203:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/sysroot-arm-none-linux-gnueabi/usr/include/sys/ucontext.h:89:
error: expected unqualified-id before ':' token
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/sysroot-arm-none-linux-gnueabi/usr/include/sys/ucontext.h:89:
error: expected ')' before ':' token

When configured without --disable-libstdcxx-pch, the pch feature is
auto-enabled, and the testcase is compiled with -include bits/stdc++.h which
avoids the problem.

I think this is a problem with the test.

Reply via email to