Warnings on hex constants [Mingw-w64/Cygwin]

Daniel Franke franke.daniel@gmail.com
Tue Jun 1 21:52:00 GMT 2010


On Monday 31 May 2010 13:31:36 N.M. Maclaren wrote:
> On May 31 2010, Steve Kargl wrote:
> >What else would you expect given that the F2003 standard states:
> >   If a data-stmt-constant is a boz-literal-constant, the corresponding
> >   variable shall be of type integer. The boz-literal-constant is treated
> >   as if it were an int-literal-constant with a kind-param that specifies
> >   the representation method with the largest decimal exponent range
> >   supported by the processor.
> >
> >Previous versions of gfortran may not have had the ability
> >to see the conversion.
> 
> Well, it's one of two things one might expect.  The other being that
> initialisation (or even constant conversion, generally) is treated
> specially, because the compiler can tell whether the conversion might
> cause trouble.  That's more work, of course.

As mentioned in the associated PR44359:

 (a) the warnings are new in 4.6 as -Wconversion got slightly santinized and
     then included in -Wall [1,2]
 (b) an updated patch that removes the warnings where range checking is
     possible exists, but it needs a review [3]

Cheers

	Daniel


[1] http://gcc.gnu.org/ml/fortran/2010-05/msg00067.html
[2] http://gcc.gnu.org/ml/fortran/2010-05/msg00109.html
[3] http://gcc.gnu.org/ml/fortran/2010-05/msg00229.html



More information about the Fortran mailing list