changeset 40246:c34f677e6117 default tip master

_Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode * lib/_Noreturn.h, m4/gnulib-common.m4: Don't use [[noreturn]] before GCC 4.8.
author Akim Demaille <akim.demaille@gmail.com>
date Sun, 17 Mar 2019 19:27:20 +0100
parents eeb8fe2e91ad
children
files ChangeLog lib/_Noreturn.h m4/gnulib-common.m4
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Mar 17 16:29:28 2019 -0700
+++ b/ChangeLog	Sun Mar 17 19:27:20 2019 +0100
@@ -1,3 +1,9 @@
+2019-03-17  Akim Demaille  <akim@lrde.epita.fr>
+
+	_Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode
+	* lib/_Noreturn.h, m4/gnulib-common.m4: Don't use [[noreturn]] before
+	GCC 4.8.
+
 2019-03-17  Paul Eggert  <eggert@cs.ucla.edu>
 
 	fts: minor simplification
--- a/lib/_Noreturn.h	Sun Mar 17 16:29:28 2019 -0700
+++ b/lib/_Noreturn.h	Sun Mar 17 19:27:20 2019 +0100
@@ -1,5 +1,6 @@
 #ifndef _Noreturn
-# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# if (201103 <= (defined __cplusplus ? __cplusplus : 0) \
+      && (!defined __GNUC__ || 4 < __GNUC__ + (8 <= __GNUC_MINOR__)))
 #  define _Noreturn [[noreturn]]
 # elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
         || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
--- a/m4/gnulib-common.m4	Sun Mar 17 16:29:28 2019 -0700
+++ b/m4/gnulib-common.m4	Sun Mar 17 19:27:20 2019 +0100
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 41
+# gnulib-common.m4 serial 42
 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,8 @@
   AH_VERBATIM([_Noreturn],
 [/* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
-# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# if (201103 <= (defined __cplusplus ? __cplusplus : 0) \
+      && (!defined __GNUC__ || 4 < __GNUC__ + (8 <= __GNUC_MINOR__)))
 #  define _Noreturn [[noreturn]]
 # elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
         || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))