This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38823] Diagnose and treat (-2.0)**2.0 properly
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2009 21:30:13 -0000
- Subject: [Bug fortran/38823] Diagnose and treat (-2.0)**2.0 properly
- References: <bug-38823-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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