[Bug fortran/90536] Spurious (?) warning when using -Wconversion with -fno-range-check

j.ravens.nz at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed May 22 23:21:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90536

--- Comment #13 from Jonathan Ravens <j.ravens.nz at gmail dot com> ---
Thanks everyone for your input on this issue.  I hadn't realised that it could
cause such dissent.

As a software developer, my major driver is to manage the users' expectations. 
In that respect, declaring a byte and being able to set it to a valid value
should not raise a warning, especially when an option called no-range-check is
in use which, intuitively, would suppress range-checking errors instead of
causing them.  I suggest it might only be technically correct from a
developer's perspective, but not from the user's.

If commonly-used constructs such as BYTE are to be removed from gfortran, I'd
expect that to require a lot of re-coding for people in general, given the
amount of legacy Fortran code in use.  In our case, I think the best option
would be to phase out usage of gfortran.


More information about the Gcc-bugs mailing list