This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nptl: Add PTHREAD_MIN_STACK C++ throw test [BZ #22636]
Hi Florian,
Florian Weimer <fweimer@redhat.com> writes:
>> +/* Test that throwing C++ exceptions works with the minimum stack size.
> Any comments on this new test?
It causes a build failure for me on the 2.26 branch with GCC 7.2.0 on
x86-64:
g++ tst-minstack-throw.cc -c -I/src/sys/glibc/work/build/ -isystem /gar/packages/gcc-7.2.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0 -isystem /gar/packages/gcc-7.2.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/x86_64-pc-linux-gnu -isystem /gar/packages/gcc-7.2.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward -O2 -Wall -Werror -Wundef -Wwrite-strings -fmerge-all-constants -fno-stack-protector -frounding-math -g -I../include -I/src/sys/glibc/work/build/nptl -I/src/sys/glibc/work/build -I../sysdeps/unix/sysv/linux/x86_64/64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/x86_64/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /gar/packages/gcc-7.2.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.2.0/include -isystem /gar/packages/gcc-7.2.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed -isystem /gar/include -isystem /gar/include -D_LIBC_REENTRANT -include /src/sys/glibc/work/build/libc-modules.h -DMODULE_NAME=testsuite -include ../include/libc-symbols.h -DTOP_NAMESPACE=glibc -o /src/sys/glibc/work/build/nptl/tst-minstack-throw.o -MD -MP -MF /src/sys/glibc/work/build/nptl/tst-minstack-throw.o.dt -MT /src/sys/glibc/work/build/nptl/tst-minstack-throw.o
tst-minstack-throw.cc:69:7: error: identifier 'static_assert' is a keyword in C++11 [-Werror=c++11-compat]
TEST_COMPARE (strcmp (e.what (), "test exception"), 0);
^~~~~~~~~~~~
In file included from tst-minstack-throw.cc:23:0:
tst-minstack-throw.cc: In function 'void* threadfunc(void*)':
../support/check.h:91:32: error: 'static_assert' was not declared in this scope
# define support_static_assert static_assert
^
../support/check.h:108:5: note: in expansion of macro 'support_static_assert'
support_static_assert ((__left_type) 1.0 == (__left_type) 1.5, \
^~~~~~~~~~~~~~~~~~~~~
tst-minstack-throw.cc:69:7: note: in expansion of macro 'TEST_COMPARE'
TEST_COMPARE (strcmp (e.what (), "test exception"), 0);
^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Thanks,
--
Adam Sampson <ats@offog.org> <http://offog.org/>