From: Roland McGrath Date: Tue, 2 Jun 2015 19:58:45 +0000 (-0700) Subject: Fix setenv.c diagnostic pragma to be compatible with GCC 4.6 X-Git-Tag: glibc-2.22~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cfae52edfb487ca3b78336a061acb6694338f72;p=thirdparty%2Fglibc.git Fix setenv.c diagnostic pragma to be compatible with GCC 4.6 --- diff --git a/ChangeLog b/ChangeLog index e78a97a1ccb..33636ba1fdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-06-02 Roland McGrath + + * stdlib/setenv.c [__GNUC__,__GNUC_MINOR__ < 4,7]: Use + "-Wuninitialized" rather than "-Wmaybe-uninitialized" in pragma. + 2015-06-02 Szabolcs Nagy * sysdeps/aarch64/libm-test-ulps: Update. diff --git a/stdlib/setenv.c b/stdlib/setenv.c index 184a8cdd07f..b9e0ba808df 100644 --- a/stdlib/setenv.c +++ b/stdlib/setenv.c @@ -24,7 +24,11 @@ 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 #if !_LIBC