This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Expectations for 0/0
- From: Paulo Matos <pmatos at broadcom dot com>
- To: Andrew Haley <aph at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 29 Jul 2015 09:37:37 +0000
- Subject: RE: Expectations for 0/0
- Authentication-results: sourceware.org; auth=none
- References: <19EB96622A777C4AB91610E763265F465EAEA0 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <55B7BDE9 dot 5060406 at redhat dot com> <19EB96622A777C4AB91610E763265F465EB36E at SJEXCHMB14 dot corp dot ad dot broadcom dot com>
> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf
> Of Paulo Matos
> Sent: 29 July 2015 10:12
> To: Andrew Haley; gcc@gcc.gnu.org
> Subject: RE: Expectations for 0/0
>
>
>
> > -----Original Message-----
> > From: Andrew Haley [mailto:aph@redhat.com]
> > Sent: 28 July 2015 18:38
> > To: Paulo Matos; gcc@gcc.gnu.org
> > Subject: Re: Expectations for 0/0
> >
> > On 07/28/2015 04:40 PM, Paulo Matos wrote:
> > > The block skips the test for ((unsigned int) xx << 1 == 0 && yy ==
> -
> > 1), should we skip it if they're both zero as well?
> >
> > Yes. It's undefined behaviour. If we don't want to invoke nasal
> > daemons we shouldn't do this.
>
>
> Thanks. I will propose a patch to avoid this.
>
My mistake. The check is already in the test but as I simplified the test, I ended up removing the check for 0 in the denominator.
Apologies.
--
Paulo Matos