------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-09-04 12:34 ------- (In reply to comment #2) > (1) at least it should go the "enhancement" with the addition of " This check > can be disabled with the option -fno-range-check"
We can do that, indeed. Reopening and marking enhancement. > (2) I think the two cases are totally different: > as soon as the compiler knows INF/NAN (and gfortran does), I think > nearest(huge(1.0),1.0)==+Inf is part of the floating point model and should > not throw even a warning (even with -std=xx -pedantic). I think the standard is very clear on that. Quoting F2003 13.7: "A program is prohibited from invoking an intrinsic procedure under circumstances where a value to be returned in a subroutine argument or function result is outside the range of values representable by objects of the specified type and type parameters, unless the intrinsic module IEEE_ARITHMETIC (section 14) is accessible and there is support for an infinite or a NaN result, as appropriate." Unless we have IEEE_ARITHMETIC, we should stick to an error. -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |enhancement Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33296