Hi Akim, Yes, -std=c++17 seems to be only supported as c++1z, highly experimental.
% g++ --version 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. % diff -u /tmp/14.ii /tmp/17.ii --- /tmp/14.ii 2018-10-31 16:56:58.187733403 +0000 +++ /tmp/17.ii 2018-10-31 16:57:03.879568918 +0000 @@ -2122,7 +2122,7 @@ using ::__gnu_cxx::strtold; } } -__attribute__ ((__noreturn__)) +_Noreturn static void die() { abort(); @@ -2130,8 +2130,8 @@ int main() { die(); - "201402L"; - "199901L"; + "201703L"; + "201112L"; "__SUNPRO_C"; "7"; "3"; % g++ /tmp/foo.cc -Wall -E -P -std=c++17 | tail -20 using ::__gnu_cxx::strtof; using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; } } _Noreturn static void die() { abort(); } int main() { die(); "201703L"; "201112L"; "__SUNPRO_C"; "7"; "3"; } Is this good information for you ? --- Kiyoshi ----- Original Message ----- > From: Akim Demaille <a...@lrde.epita.fr> > To: Kiyoshi KANAZAWA <yoi_no_myou...@yahoo.co.jp>; Paul Eggert > <egg...@cs.ucla.edu> > Cc: Bison Bugs <bug-bison@gnu.org> > Date: 2018/10/31, Wed 15:37 > Subject: Re: bison-3.2 make fails on Solaris 11.3 x86/64 > > 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. >