Re: [PATCH v3] LoongArch: fix missing trap for enabled exceptions on narrowing operation

Yury Khrustalev <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
On Wed, Jul 08, 2026 at 07:51:19PM +0800, Xi Ruoyao wrote:
> On Tue, 2026-07-07 at 15:06 +0100, Yury Khrustalev wrote:
> >
> > ...
> > 
> > This simple fix should work I think.
> > 
> > diff --git a/math/test-narrowing-trap.c b/math/test-narrowing-trap.c
> > index 6d21357913..5871cb33fc 100644
> > --- a/math/test-narrowing-trap.c
> > +++ b/math/test-narrowing-trap.c
> > @@ -29,14 +29,14 @@ do_test (void)
> > �#ifdef FE_INVALID
> > �� pid_t pid;
> > �
> > -� if (!EXCEPTION_ENABLE_SUPPORTED (FE_INVALID))
> > -��� FAIL_UNSUPPORTED ("feenableexcept (FE_INVALID) not supported");
> > -
> > �� pid = xfork ();
> > �� if (pid == 0)
> > ���� {
> > ������ int r = feenableexcept (FE_INVALID);
> > �
> > +����� if (!EXCEPTION_ENABLE_SUPPORTED (FE_INVALID) && (r == -1))
> 
> The parentheses around r == -1 is redundant.  Otherwise OK to me.

I don't think it's redundant, it's the most meaningful part. Also other
math tests have it.

Yury
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.