From f1d237df1eec1df8cbc34f95540fd4035776e79c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 27 Oct 2015 23:42:20 +0000 Subject: Remove GCC version conditionals on -Wmaybe-uninitialized pragmas. One common case of __GNUC_PREREQ (4, 7) conditionals is use of diagnostic control pragmas for -Wmaybe-uninitialized, an option introduced in GCC 4.7 where older GCC needed -Wuninitialized to be controlled instead if the warning appeared with older GCC. This patch removes such conditionals. (There remain several older uses of -Wno-uninitialized in makefiles that still need to be converted to diagnostic control pragmas if the issue is still present with current sources and supported GCC versions, and it's likely that in most cases those pragmas also will end up controlling -Wmaybe-uninitialized.) Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch, except for libresolv since res_send.c contains assertions whose line numbers are changed by the patch). * resolv/res_send.c (send_vc) [__GNUC_PREREQ (4, 7)]: Make code unconditional. * soft-fp/fmadf4.c [__GNUC_PREREQ (4, 7)]: Likewise. [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * soft-fp/fmasf4.c [__GNUC_PREREQ (4, 7)]: Make code unconditional. [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * soft-fp/fmatf4.c [__GNUC_PREREQ (4, 7)]: Make code unconditional. [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * stdlib/setenv.c [((__GNUC__ << 16) + __GNUC_MINOR__) >= ((4 << 16) + 7)]: Make code unconditional. [!(((__GNUC__ << 16) + __GNUC_MINOR__) >= ((4 << 16) + 7))]: Remove conditional code. * sysdeps/ieee754/dbl-64/e_lgamma_r.c (__ieee754_lgamma_r) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__ieee754_lgamma_r) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__ieee754_lgammaf_r) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-128/k_tanl.c (__kernel_tanl) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__kernel_tanl) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c (__kernel_tanl) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__kernel_tanl) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-96/e_lgammal_r.c (__ieee754_lgammal_r) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__ieee754_lgammal_r) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-96/k_tanl.c (__kernel_tanl) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__kernel_tanl) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. --- sysdeps/ieee754/dbl-64/e_lgamma_r.c | 4 ---- sysdeps/ieee754/flt-32/e_lgammaf_r.c | 4 ---- sysdeps/ieee754/ldbl-128/k_tanl.c | 4 ---- sysdeps/ieee754/ldbl-128ibm/k_tanl.c | 4 ---- sysdeps/ieee754/ldbl-96/e_lgammal_r.c | 4 ---- sysdeps/ieee754/ldbl-96/k_tanl.c | 4 ---- 6 files changed, 24 deletions(-) (limited to 'sysdeps/ieee754') diff --git a/sysdeps/ieee754/dbl-64/e_lgamma_r.c b/sysdeps/ieee754/dbl-64/e_lgamma_r.c index da158cb..15154c0 100644 --- a/sysdeps/ieee754/dbl-64/e_lgamma_r.c +++ b/sysdeps/ieee754/dbl-64/e_lgamma_r.c @@ -302,11 +302,7 @@ __ieee754_lgamma_r(double x, int *signgamp) although in the cases where it is used it has always been set. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (4, 7) DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmaybe-uninitialized"); -#else - DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wuninitialized"); -#endif if(hx<0) r = nadj - r; DIAG_POP_NEEDS_COMMENT; return r; diff --git a/sysdeps/ieee754/flt-32/e_lgammaf_r.c b/sysdeps/ieee754/flt-32/e_lgammaf_r.c index 45a62c0..4d8a66b 100644 --- a/sysdeps/ieee754/flt-32/e_lgammaf_r.c +++ b/sysdeps/ieee754/flt-32/e_lgammaf_r.c @@ -238,11 +238,7 @@ __ieee754_lgammaf_r(float x, int *signgamp) although in the cases where it is used it has always been set. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (4, 7) DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmaybe-uninitialized"); -#else - DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wuninitialized"); -#endif if(hx<0) r = nadj - r; DIAG_POP_NEEDS_COMMENT; return r; diff --git a/sysdeps/ieee754/ldbl-128/k_tanl.c b/sysdeps/ieee754/ldbl-128/k_tanl.c index 8ff9192..6bb221e 100644 --- a/sysdeps/ieee754/ldbl-128/k_tanl.c +++ b/sysdeps/ieee754/ldbl-128/k_tanl.c @@ -141,11 +141,7 @@ __kernel_tanl (long double x, long double y, int iy) uninitialized although in the cases where it is used it has always been set. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (4, 7) DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); -#else - DIAG_IGNORE_NEEDS_COMMENT (5, "-Wuninitialized"); -#endif if (sign < 0) w = -w; DIAG_POP_NEEDS_COMMENT; diff --git a/sysdeps/ieee754/ldbl-128ibm/k_tanl.c b/sysdeps/ieee754/ldbl-128ibm/k_tanl.c index 22e53fc..3c1bf32 100644 --- a/sysdeps/ieee754/ldbl-128ibm/k_tanl.c +++ b/sysdeps/ieee754/ldbl-128ibm/k_tanl.c @@ -141,11 +141,7 @@ __kernel_tanl (long double x, long double y, int iy) uninitialized although in the cases where it is used it has always been set. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (4, 7) DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); -#else - DIAG_IGNORE_NEEDS_COMMENT (5, "-Wuninitialized"); -#endif if (sign < 0) w = -w; DIAG_POP_NEEDS_COMMENT; diff --git a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c index a80002b..9862fe8 100644 --- a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c +++ b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c @@ -430,11 +430,7 @@ __ieee754_lgammal_r (long double x, int *signgamp) in warnings that it may be used uninitialized although in the cases where it is used it has always been set. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (4, 7) DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmaybe-uninitialized"); -#else - DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wuninitialized"); -#endif if (se & 0x8000) r = nadj - r; DIAG_POP_NEEDS_COMMENT; diff --git a/sysdeps/ieee754/ldbl-96/k_tanl.c b/sysdeps/ieee754/ldbl-96/k_tanl.c index 6bee53e..0c050c1 100644 --- a/sysdeps/ieee754/ldbl-96/k_tanl.c +++ b/sysdeps/ieee754/ldbl-96/k_tanl.c @@ -138,11 +138,7 @@ __kernel_tanl (long double x, long double y, int iy) uninitialized although in the cases where it is used it has always been set. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (4, 7) DIAG_IGNORE_NEEDS_COMMENT (4.8, "-Wmaybe-uninitialized"); -#else - DIAG_IGNORE_NEEDS_COMMENT (4.8, "-Wuninitialized"); -#endif if (sign < 0) w = -w; DIAG_POP_NEEDS_COMMENT; -- cgit v1.1