# HG changeset patch # User Akim Demaille # Date 1552847240 -3600 # Node ID c34f677e6117d1c293338328a6c9b9ce18e9ef53 # Parent eeb8fe2e91ad7c2f8f59a36e62d00fd78a982aee _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. diff -r eeb8fe2e91ad -r c34f677e6117 ChangeLog --- 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 + + _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 fts: minor simplification diff -r eeb8fe2e91ad -r c34f677e6117 lib/_Noreturn.h --- 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__)) diff -r eeb8fe2e91ad -r c34f677e6117 m4/gnulib-common.m4 --- 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__))