This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING^3] PR 21438 : Warning about division by zero depends on lexical form
Manuel López-Ibáñez writes:
> On 02/03/07, Mark Mitchell <mark@codesourcery.com> wrote:
> > Joseph S. Myers wrote:
> >
> > I don't know that I entirely agree that we should not warn about
> > 1.0/0.0. In particular, if doing that division would generate a SIGFPE
> > on the target, were it not folded, then it seems reasonable to warn
> > about it.
> >
>
> I think that if it generates a SIGFPE, then it is not a legitimate way
> to generate infinities and NaNs.
>
> Can I detect that from the front-end? How?
I doubt it. Is a target that generates SIGFPE from 1.0/0.0
IEEE-754(etc) compliant? I would not have thought so, but it can be
hard to be certain.
Andrew.