From 1a7dcb63e0b1c155a0180c88eab028f25937b600 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 May 2012 08:59:49 -0700 Subject: [PATCH] _Noreturn: port config.h to gcc -Wundef * m4/gnulib-common.m4 (gl_COMMON_BODY): Check that __STDC_VERSION__ is defined before using it, for gcc -Wundef. Reported by Akim Demaille in . --- ChangeLog | 7 +++++++ m4/gnulib-common.m4 | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 29df987d4..9edbd9c8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-05-10 Paul Eggert + + _Noreturn: port config.h to gcc -Wundef + * m4/gnulib-common.m4 (gl_COMMON_BODY): Check that __STDC_VERSION__ is + defined before using it, for gcc -Wundef. Reported by Akim Demaille in + . + 2012-05-10 Bruno Haible system-quote: Refactor. diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index ab3c43d7b..d62b7677a 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -14,7 +14,8 @@ AC_DEFUN([gl_COMMON], [ AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* The _Noreturn keyword of C11. */ -#if !defined _Noreturn && __STDC_VERSION__ < 201112 +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) -- 2.11.0