This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/38823] Diagnose and treat (-2.0)**2.0 properly



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]