Hi Kiyoshi, (Paul, that’s typically some area where your expertise would be most helpful).
> Le 31 oct. 2018 à 00:03, Kiyoshi KANAZAWA <yoi_no_myou...@yahoo.co.jp> a > écrit : > > Hello, > > What I did are: > % ./configure --prefix=/opt/local --disable-nls CC=gcc CXX=g++ > (GNU softwares are installed on /opt/local) > % make > % make -k check > > Also did the same with bison-3.1, because I remember > >>> 479: C++ GLR parser identifier shadowing FAILED (c++.at:1332) > > was not found with it. > > testsuite.log of both are attached. Thanks a lot. Bison 3.1 did not have this test, that’s why it passed (well, rather the test is now more complete: before we were not trying several C++ standards). The failure is: ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS stderr: input.cc:841:8: error: '_Noreturn' does not name a type static _Noreturn void ^~~~~~~~~ input.cc:849:8: error: '_Noreturn' does not name a type static _Noreturn void ^~~~~~~~~ So the core of your problem is this (/tmp/foo.cc): #include <cstdlib> #define STRINGIZE_(S) #S #define STRINGIZE(S) STRINGIZE_(S) #undef _Noreturn /* The _Noreturn keyword of C11. */ #if ! (defined _Noreturn \ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif _Noreturn static void die() { abort(); } int main() { die(); STRINGIZE(__cplusplus); STRINGIZE(__STDC_VERSION__); STRINGIZE(__SUNPRO_C); STRINGIZE(__GNUC__); STRINGIZE(__GNUC_MINOR__); } Your C++ compiler behaves as expected for ‘-std=c++98’, ‘-std=c++03’, ‘-std=c++11’, ‘-std=c++14’, but not for ‘-std=c++17’. I need your help to see what it needs. What I don’t understand is that your C++ compiler appears to be GCC. | configure:5994: checking for C++ compiler version | configure:6003: g++ --version >&5 | g++ (GCC) 7.3.0 | Copyright (C) 2017 Free Software Foundation, Inc. | This is free software; see the source for copying conditions. There is NO | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | configure:6014: $? = 0 configure did notice that ‘-std=c++98’, ‘-std=c++03’, ‘-std=c++11’, ‘-std=c++14’, *and* ‘-std=c++17’ are supported, but not 2a, which is fine. Please, try this: 1. put the program above in some file, say /tmp/foo.cc 2. run g++ /tmp/foo.cc -Wall -E -P -std=c++14 > /tmp/14.ii 3. run g++ /tmp/foo.cc -Wall -E -P -std=c++17 > /tmp/17.ii 4. show me the diff -u /tmp/14.ii /tmp/17.ii 5. and show me g++ /tmp/foo.cc -Wall -E -P -std=c++17 | tail -20 Maybe you’ll see what is needed: we need to understand what changes with -std=c++17 that results in _Noreturn not being defined at all. Also, pay attention that in the case of the test case itself (in the Bison test suite), config.h might shadow what we do about _Noreturn. Eventually we shall use [[noreturn]] in C++11 onwards, but first, let’s see what’s happening here.