]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix Wundef warning for __STDC_VERSION__
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 2 Jul 2014 20:02:17 +0000 (01:32 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 2 Jul 2014 20:19:48 +0000 (01:49 +0530)
c4c4124473c187b5c4642611390897666c3d3970 added the _Noreturn macro for
pre-C11 compilers, but it now throws a new Wundef warning during `make
check` for __STDC_VERSION__ which gcc does not define by default.  The
following patch fixes this in line with other uses of __STDC_VERSION__
in the file.

ChangeLog
misc/sys/cdefs.h

index 7b336046bfb069d96f487da8c6caece11d9134c7..049de91757bac9602e68defb58e030aa0cf5f4bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-02  Roland McGrath  <roland@hack.frob.com>
+
+       * misc/sys/cdefs.h: Check if __STDC_VERSION__ is defined
+       before checking its value.
+
 2014-07-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        * intl/loadmsgcat.c (_nl_load_domain): Use __builtin_expect.
index a5c3224a645625356cd1467120cd310d4e761c3f..04db9563fb13520ec227e2075b4aa04c1b200c2c 100644 (file)
 # define __glibc_likely(cond)  (cond)
 #endif
 
-#if !defined _Noreturn && __STDC_VERSION__ < 201112 && !__GNUC_PREREQ (4,7)
+#if (!defined _Noreturn \
+     && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+     &&  !__GNUC_PREREQ (4,7))
 # if __GNUC_PREREQ (2,8)
 #  define _Noreturn __attribute__ ((__noreturn__))
 # else