From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 049E23858407; Wed, 11 Jan 2023 21:09:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 049E23858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673471379; bh=oZR9xfS6C8wIth0oTqGGvu4+/E3CvIN4RU65KPt4e/s=; h=From:To:Subject:Date:From; b=Rp56a1vY38RzBB64OVAQ1YhIyusR57uLeSnZwUSALWoVqsfpb0bXZUPz8grH/VOJ8 /q7NNM842GHi5T2rxmrhW4ByBQkz8/UtrOYQ3evWGJx7sSWgkRhT1LdIidcWyWmCIq mU3IhEguoWKXRZ7X0icVM63MANzKGkyLFprweoX8= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/main] math: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444] X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/main X-Git-Oldrev: 8176efe3cabeee003f193f6b877297bf5aee8eb6 X-Git-Newrev: 30546ac2d1d64adff07d317e3041ec0fc6e32f6d Message-Id: <20230111210939.049E23858407@sourceware.org> Date: Wed, 11 Jan 2023 21:09:39 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=30546ac2d1d64adff07d317e3041ec0fc6e32f6d commit 30546ac2d1d64adff07d317e3041ec0fc6e32f6d Author: Adhemerval Zanella Date: Thu Dec 29 09:58:02 2022 -0300 math: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444] The patch suppress the same warnings from 87c266d758d29e52bfb717f90, that shows issues for microblaze, mips soft-fp, nios2, and or1k. Reviewed-by: Carlos O'Donell Diff: --- sysdeps/ieee754/soft-fp/s_fsqrt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sysdeps/ieee754/soft-fp/s_fsqrt.c b/sysdeps/ieee754/soft-fp/s_fsqrt.c index 68f5146976..9fd3c839d4 100644 --- a/sysdeps/ieee754/soft-fp/s_fsqrt.c +++ b/sysdeps/ieee754/soft-fp/s_fsqrt.c @@ -25,6 +25,15 @@ #undef fsqrtl #include +#include +/* R_f[01] are not set in cases where they are not used in packing, + but the compiler does not see that they are set in all cases where + they are used, resulting in warnings that they may be used + uninitialized. The location of the warning differs in different + versions of GCC, it may be where R is defined using a macro or it + may be where the macro is defined. This happens only with -O1. */ +DIAG_PUSH_NEEDS_COMMENT; +DIAG_IGNORE_NEEDS_COMMENT (8, "-Wmaybe-uninitialized"); #include #include #include @@ -51,4 +60,6 @@ __fsqrt (double x) CHECK_NARROW_SQRT (ret, x); return ret; } +DIAG_POP_NEEDS_COMMENT; + libm_alias_float_double (sqrt)