[Bug fortran/38823] Diagnose and treat (-2.0)**2.0 properly
sgk at troutmask dot apl dot washington dot edu
gcc-bugzilla@gcc.gnu.org
Tue Jan 13 21:30:00 GMT 2009
------- Comment #11 from sgk at troutmask dot apl dot washington dot edu 2009-01-13 21:30 -------
Subject: Re: Diagnose and treat (-2.0)**2.0 properly
On Tue, Jan 13, 2009 at 09:13:57PM -0000, dominiq at lps dot ens dot fr wrote:
>
>
> ------- Comment #10 from dominiq at lps dot ens dot fr 2009-01-13 21:13 -------
> > I intend to change this, conditional on perhaps -ffast-math and/or -pedantic,
>
> I don't understand the "and/or": -ffast-math and -pedantic at the same time
> does not make any sense for me, -ffast-math allows some sloppiness with respect
> to the standard, while -pedantic does not.
I haven't decided how I want to handle the general case. There
are few possibilities:
gfortran file.f90
Do nothing, ie., the status quo
gfortran -pedantic file.f90
Add a runtime check that x in x**y is not < 0.
or
gfortran file.f90
Add a runtime check that x in x**y is not < 0.
gfortran -ffast-math file.f90
Do not add a runtime check.
or
gfortran -fsome_new_option file.f90
Add a runtime check.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38823
More information about the Gcc-bugs
mailing list