public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH 4/4] math: Suppress -O0 warnings for soft-fp fsqrt [BZ #19444]
Date: Tue, 10 Jan 2023 17:54:19 -0500	[thread overview]
Message-ID: <deb43840-24cd-2a1a-a7d7-3ecce59f306e@redhat.com> (raw)
In-Reply-To: <20221229125802.2715435-5-adhemerval.zanella@linaro.org>

On 12/29/22 07:58, Adhemerval Zanella via Libc-alpha wrote:
> The patch suppress the same warnings from 87c266d758d29e52bfb717f90,
> that shows issues for microblaze, mips soft-fp, nios2, and or1k.

LGTM.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  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 ef631bc6c2..d5c7904118 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");

OK. Agreed, R's usage in _FP_SQRT is conditional.

>  #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)

-- 
Cheers,
Carlos.


      reply	other threads:[~2023-01-10 22:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29 12:57 [PATCH 0/4] Fix remaining -Os/-O1 compile issues " Adhemerval Zanella
2022-12-29 12:57 ` [PATCH 1/4] locale: Use correct buffer size for utf8_sequence_error " Adhemerval Zanella
2023-01-09 16:40   ` Carlos O'Donell
2022-12-29 12:58 ` [PATCH 2/4] sunrpc: Suppress GCC -O1 warning on user2netname " Adhemerval Zanella
2023-01-09 17:09   ` Carlos O'Donell
2022-12-29 12:58 ` [PATCH 3/4] string: Suppress -Wmaybe-unitialized for wordcopy " Adhemerval Zanella
2023-01-10 22:47   ` Carlos O'Donell
2023-01-11 13:14     ` Adhemerval Zanella Netto
2023-01-11 19:33       ` Carlos O'Donell
2023-01-11 20:12       ` Carlos O'Donell
2022-12-29 12:58 ` [PATCH 4/4] math: Suppress -O0 warnings for soft-fp fsqrt " Adhemerval Zanella
2023-01-10 22:54   ` Carlos O'Donell [this message]

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=deb43840-24cd-2a1a-a7d7-3ecce59f306e@redhat.com \
    --to=carlos@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@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).