]> Savannah Git Hosting - gnulib.git/commitdiff
_Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode
authorAkim Demaille <akim.demaille@gmail.com>
Sun, 17 Mar 2019 18:27:20 +0000 (19:27 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Mon, 18 Mar 2019 07:16:22 +0000 (08:16 +0100)
* lib/_Noreturn.h, m4/gnulib-common.m4: Don't use [[noreturn]] before
GCC 4.8.

ChangeLog
lib/_Noreturn.h
m4/gnulib-common.m4

index 28787600fa9def87418136cd68e1028901dd35b5..81e37104868d700adcf124ce34ea64e48e64c530 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 94fdfaf0220f98b42c569d0f9040ee6df3306ce4..19597e0bf310cf9a2624efed008dbc9bc5b15ac9 100644 (file)
@@ -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__))
index 7c0e3e8fa4a77bb90c733ec6a3dc401a503c28f5..688a1e59e812c762c35711f5a88e80f362c6ef0e 100644 (file)
@@ -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 @@ AC_DEFUN([gl_COMMON_BODY], [
   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__))