public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/main] math: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444]
Date: Wed, 11 Jan 2023 21:09:39 +0000 (GMT)	[thread overview]
Message-ID: <20230111210939.049E23858407@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=30546ac2d1d64adff07d317e3041ec0fc6e32f6d

commit 30546ac2d1d64adff07d317e3041ec0fc6e32f6d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <carlos@redhat.com>

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 <math-narrow.h>
+#include <libc-diag.h>
+/* 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 <soft-fp.h>
 #include <single.h>
 #include <double.h>
@@ -51,4 +60,6 @@ __fsqrt (double x)
   CHECK_NARROW_SQRT (ret, x);
   return ret;
 }
+DIAG_POP_NEEDS_COMMENT;
+
 libm_alias_float_double (sqrt)

                 reply	other threads:[~2023-01-11 21:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230111210939.049E23858407@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).