]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix setenv.c diagnostic pragma to be compatible with GCC 4.6
authorRoland McGrath <roland@hack.frob.com>
Tue, 2 Jun 2015 19:58:45 +0000 (12:58 -0700)
committerRoland McGrath <roland@hack.frob.com>
Tue, 2 Jun 2015 19:58:45 +0000 (12:58 -0700)
ChangeLog
stdlib/setenv.c

index e78a97a1ccb5e2ed96b1b1985a33058b00498235..33636ba1fdb57709ff3a31087f0701b85bd764a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-02  Roland McGrath  <roland@hack.frob.com>
+
+       * stdlib/setenv.c [__GNUC__,__GNUC_MINOR__ < 4,7]: Use
+       "-Wuninitialized" rather than "-Wmaybe-uninitialized" in pragma.
+
 2015-06-02  Szabolcs Nagy  <szabolcs.nagy@arm.com>
 
        * sysdeps/aarch64/libm-test-ulps: Update.
index 184a8cdd07f54d220058a17b0cd225316d18b02b..b9e0ba808df053444cbaac645bee72677e8e6000 100644 (file)
    there seems to be no way to pacify GCC selectively, only for the
    place where it's needed.  Do not use DIAG_IGNORE_NEEDS_COMMENT
    here, as it's not defined yet.  */
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#if ((__GNUC__ << 16) + __GNUC_MINOR__) >= ((4 << 16) + 7)
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#else
+# pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
 
 #include <errno.h>
 #if !_LIBC