------- Comment #14 from burnus at gcc dot gnu dot org  2007-12-11 23:15 -------
> As I understand the F2003 standard, the expression "INT(z'ff',1)" should
> produce a range error, for the same reasons as the data statement illustrated
> in:
> http://gcc.gnu.org/onlinedocs/gfortran/BOZ-literal-constants.html
> In practice, I don't think any compilers do this (yet).

Well, I am not sure whether the compiler is required to do so; with some BOZ
work, I disabled accidentally some range checks (see PR 34398), but your INT
gives an error with gfortran:

print *, INT(z'ff',1)
            1
Error: Result of INT overflows its kind at (1)

(Note: the value "1" is a (common) implementation choice; not every compiler
has kind = byte size.)


> Maybe there should be a "-f[no-]boz-range-check" to exclude range errors just
> for the BOZ case.
I think -fno-range-check should be enough for both, shouldn't it?


> F2008 draft, it re-defines B/O/Z literals, named BITS instead of BOZ.
That part got dropped, see 13 August at:
http://www.nag.co.uk/sc22wg5/


-- 


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

Reply via email to