From patchwork Mon Aug 24 14:09:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 8402 Received: (qmail 129255 invoked by alias); 24 Aug 2015 14:09:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 129245 invoked by uid 89); 24 Aug 2015 14:09:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de From: Andreas Schwab To: Joseph Myers Cc: Subject: Re: Don't use -Wno-uninitialized in math/ References: X-Yow: ONE: I will donate my entire ``BABY HUEY'' comic book collection to the downtown PLASMA CENTER.. TWO: I won't START a BAND called ``KHADAFY & THE HIT SQUAD''.. THREE: I won't ever TUMBLE DRY my FOX TERRIER again!! Date: Mon, 24 Aug 2015 16:09:06 +0200 In-Reply-To: (Joseph Myers's message of "Mon, 24 Aug 2015 11:26:39 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Joseph Myers writes: > Does putting the DIAG_* macros (with appropriate comments) in the relevant > inline functions (possibly libc_feresetround_aarch64_ctx or > libc_feresetround_noex_aarch64_ctx) help? This works: * sysdeps/aarch64/fpu/math_private.h (libc_feresetround_aarch64_ctx): Suppress maybe-uninitialized warning. --- sysdeps/aarch64/fpu/math_private.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h index 1f02ddb..28c4497 100644 --- a/sysdeps/aarch64/fpu/math_private.h +++ b/sysdeps/aarch64/fpu/math_private.h @@ -21,6 +21,7 @@ #include #include +#include #define math_opt_barrier(x) \ ({ __typeof (x) __x = (x); __asm ("" : "+w" (__x)); __x; }) @@ -274,7 +275,15 @@ libc_feresetround_aarch64_ctx (struct rm_ctx *ctx) { /* Restore the rounding mode if updated. */ if (__glibc_unlikely (ctx->updated_status)) - _FPU_SETCW (ctx->env.__fpcr); + { + /* The initialisation of ctx->env.__fpcr in + libc_feholdsetround_aarch64_ctx is guarded by the same condition, + but GCC doesn't see that. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); + _FPU_SETCW (ctx->env.__fpcr); + DIAG_POP_NEEDS_COMMENT; + } } #define libc_feresetround_ctx libc_feresetround_aarch64_ctx