[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: |
Wed, 31 Oct 2018 09:49:28 +0100 |
> Le 31 oct. 2018 à 09:15, Kiyoshi KANAZAWA <address@hidden> a écrit :
>
> Hi Akim,
>
> @@ -2130,8 +2130,8 @@
> int main()
> {
> die();
> - "201402L";
> - "199901L";
> + "201703L";
> + "201112L";
good.
Let’s try this patch then. It should not have too much impact
on the common case of a C compiler.
https://www.lrde.epita.fr/~akim/private/bison/bison-3.2.6-b8bb.tar.gz
https://www.lrde.epita.fr/~akim/private/bison/bison-3.2.6-b8bb.tar.xz
commit b8bb6edc84465cca7474b6e0e95d1977f19bb0cf
Author: Akim Demaille <address@hidden>
Date: Wed Oct 31 09:25:04 2018 +0100
c: provide a definition of _Noreturn that works for C++
On Solaris, GCC 7.3 defines:
-std=c++14 -std=c++17
__cplusplus 201402L 201703L
__STDC_VERSION__ 199901L 201112L
So the current #definition of _Noreturn sees that 201112 <=
__STDC_VERSION__, i.e., that C11 is supported, so it expects _Noreturn
to be supported. Apparently it is not.
This is only for C++, the test suite works for C. However, the test
suite does not try several C standards, maybe we should...
http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00064.html
* data/c.m4 (b4_attribute_define): Define _Noreturn as [[noreturn]] in
modern C++.
diff --git a/data/c.m4 b/data/c.m4
index 04df3ffc..77900e6d 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -230,7 +230,9 @@ m4_define([b4_attribute_define],
]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__) \
+# if defined __cplusplus && 201103L <= __cplusplus
+# define _Noreturn [[noreturn]]
+# elif (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
|| 0x5110 <= __SUNPRO_C)
# define _Noreturn __attribute__ ((__noreturn__))
# elif defined _MSC_VER && 1200 <= _MSC_VER
- 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, 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, 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 <=
- 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