[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison-3.2 make fails on Solaris 11.3 x86/64
From: |
Akim Demaille |
Subject: |
Re: bison-3.2 make fails on Solaris 11.3 x86/64 |
Date: |
Tue, 30 Oct 2018 19:57:16 +0100 |
> Le 30 oct. 2018 à 09:49, Kiyoshi KANAZAWA <address@hidden> a écrit :
>
> Hello,
>
> make passed with bison-3.2.3-5d07f.
>
> 479: C++ GLR parser identifier shadowing FAILED (c++.at:1332)
This is:
> # -*- compilation -*-
> 479. c++.at:1293: testing C++ GLR parser identifier shadowing ...
> ./c++.at:1331: bison -fno-caret -o input.cc input.yy
> ======== Testing with C++ standard flags: ''
> ./c++.at:1332: $BISON_CXX_WORKS
> stderr:
> stdout:
> ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
> stderr:
> stdout:
> ======== Testing with C++ standard flags: '-std=c++98'
> ./c++.at:1332: $BISON_CXX_WORKS
> stderr:
> stdout:
> ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
> stderr:
> stdout:
> ======== Testing with C++ standard flags: '-std=c++03'
> ./c++.at:1332: $BISON_CXX_WORKS
> stderr:
> stdout:
> ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
> stderr:
> stdout:
> ======== Testing with C++ standard flags: '-std=c++11'
> ./c++.at:1332: $BISON_CXX_WORKS
> stderr:
> stdout:
> ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
> stderr:
> stdout:
> ======== Testing with C++ standard flags: '-std=c++14'
> ./c++.at:1332: $BISON_CXX_WORKS
> stderr:
> stdout:
> ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
> stderr:
> stdout:
> ======== Testing with C++ standard flags: '-std=c++17'
> ./c++.at:1332: $BISON_CXX_WORKS
> stderr:
> stdout:
> ./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
> stderr:
> input.cc:837:8: error: '_Noreturn' does not name a type
> static _Noreturn void
> ^~~~~~~~~
> input.cc:845:8: error: '_Noreturn' does not name a type
> static _Noreturn void
> ^~~~~~~~~
> input.cc: In function 'void yyexpandGLRStack(yyGLRStack*)':
> input.cc:1226:5: error: 'yyMemoryExhausted' was not declared in this scope
> yyMemoryExhausted (yystackp);
> ^~~~~~~~~~~~~~~~~
> input.cc:1232:5: error: 'yyMemoryExhausted' was not declared in this scope
> yyMemoryExhausted (yystackp);
> ^~~~~~~~~~~~~~~~~
> input.cc: In function 'std::size_t yysplitStack(yyGLRStack*, std::size_t)':
> input.cc:1568:9: error: 'yyMemoryExhausted' was not declared in this scope
> yyMemoryExhausted (yystackp);
> ^~~~~~~~~~~~~~~~~
> input.cc:1576:9: error: 'yyMemoryExhausted' was not declared in this scope
> yyMemoryExhausted (yystackp);
> ^~~~~~~~~~~~~~~~~
> input.cc:1584:9: error: 'yyMemoryExhausted' was not declared in this scope
> yyMemoryExhausted (yystackp);
> ^~~~~~~~~~~~~~~~~
> input.cc: In function 'void yyrecoverSyntaxError(yyGLRStack*, yy::parser&)':
> input.cc:2225:11: error: 'yyFail' was not declared in this scope
> yyFail (yystackp, yyparser, YY_NULLPTR);
> ^~~~~~
> input.cc:2225:11: note: suggested alternative: 'yyfill'
> yyFail (yystackp, yyparser, YY_NULLPTR);
> ^~~~~~
> yyfill
> input.cc:2262:5: error: 'yyFail' was not declared in this scope
> yyFail (yystackp, yyparser, YY_NULLPTR);
> ^~~~~~
> input.cc:2262:5: note: suggested alternative: 'yyfill'
> yyFail (yystackp, yyparser, YY_NULLPTR);
> ^~~~~~
> yyfill
> input.cc:2296:5: error: 'yyFail' was not declared in this scope
> yyFail (yystackp, yyparser, YY_NULLPTR);
> ^~~~~~
> input.cc:2296:5: note: suggested alternative: 'yyfill'
> yyFail (yystackp, yyparser, YY_NULLPTR);
> ^~~~~~
> yyfill
> input.cc: In function 'int yyparse(yy::parser&)':
> input.cc:2446:17: error: 'yyFail' was not declared in this scope
> yyFail (&yystack, yyparser, YY_("syntax error"));
> ^~~~~~
> input.cc:2446:17: note: suggested alternative: 'yyfill'
> yyFail (&yystack, yyparser, YY_("syntax error"));
> ^~~~~~
> yyfill
> stdout:
> ./c++.at:1332: exit code was 1, expected 0
> 479. c++.at:1293: 479. C++ GLR parser identifier shadowing (c++.at:1293):
> FAILED (c++.at:1332)
So I propose the patch below. Here, the real testsuite.log would probably
have been useful.
Please report the result on this tarball:
https://www.lrde.epita.fr/~akim/private/bison/bison-3.2.5-bd7ae.tar.gz
https://www.lrde.epita.fr/~akim/private/bison/bison-3.2.5-bd7ae.tar.xz
Thanks in advance.
commit bd7aebb8b002f0706bfa771f22c01f243fa7fbcf
Author: Akim Demaille <address@hidden>
Date: Tue Oct 30 19:09:46 2018 +0100
c: update the definition of _Noreturn
Does not work on Solaris 11.3 x86/64:
479. c++.at:1293: testing C++ GLR parser identifier shadowing ...
======== Testing with C++ standard flags: '-std=c++17'
./c++.at:1332: $BISON_CXX_WORKS
stderr:
stdout:
./c++.at:1332: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc
$LIBS
stderr:
input.cc:837:8: error: '_Noreturn' does not name a type
static _Noreturn void
^~~~~~~~~
input.cc:845:8: error: '_Noreturn' does not name a type
static _Noreturn void
^~~~~~~~~
Reported by Kiyoshi Kanazawa.
http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00051.html
* data/c.m4 (b4_attribute_define): Use the snippet which is currently
in gnulib's m4/gnulib-common.m4 (which seems a little more advanced
than lib/_Noreturn.h).
diff --git a/data/c.m4 b/data/c.m4
index 2df76e77..04df3ffc 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -227,12 +227,16 @@ m4_define([b4_attribute_define],
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif
-]m4_bmatch([$1], [\bnoreturn\b], [[#if !defined _Noreturn \
- && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
-# if defined _MSC_VER && 1200 <= _MSC_VER
+]m4_bmatch([$1], [\bnoreturn\b], [[/* 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 YY_ATTRIBUTE ((__noreturn__))
+# define _Noreturn
# endif
#endif
- bison-3.2 make fails on Solaris 11.3 x86/64, Kiyoshi KANAZAWA, 2018/10/29
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Akim Demaille, 2018/10/30
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Kiyoshi KANAZAWA, 2018/10/30
- Re: bison-3.2 make fails on Solaris 11.3 x86/64,
Akim Demaille <=
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Kiyoshi KANAZAWA, 2018/10/30
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Akim Demaille, 2018/10/31
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Kiyoshi KANAZAWA, 2018/10/31
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Akim Demaille, 2018/10/31
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Kiyoshi KANAZAWA, 2018/10/31
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Akim Demaille, 2018/10/31
- Re: bison-3.2 make fails on Solaris 11.3 x86/64, Kiyoshi KANAZAWA, 2018/10/31