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/43310] -pedantic errors on valid code involving PARAMETERs initialized to intrinsic function result



------- Comment #5 from kargl at gcc dot gnu dot org  2010-03-10 03:15 -------
(In reply to comment #4)

> 
> "Not all valid FORTRAN 95 programs will compile properly when using this
> option.  If you want to ensure compliance with one of the FORTRAN standards,
> please see the -std= option."
> 

The problem is that your program does not conform to
the Fortran 95 standard.  A program(mer) is forbidden
to call an intrinsic procedure if it returns a result
that is outside the representable range of the return 
trye.  When you specified -pedantic, you declared that
the representable range is [-huge():huge()], which is 
a strict interpretation of the model number representation
of an integer.  NOT(1) is invalid with -pedantic.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43310


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