*Ping* patch, fortran] Warn about constant integer divisions

FX fxcoudert@gmail.com
Thu Jun 25 07:20:00 GMT 2015


> Perhaps, we then need to review what -Wall is/does, or
> can we remove -Wmaybe-uninitialized and maybe -Wconversion
> from -Wall?

Indeed. I know -Wmaybe-uninitialized is the reason why I don’t use -Wall on my own large codes.
Otherwise, we may want to redefine the meaning of -Wall, to be closer to “literaly (almost) all warnings”.


> Every warning I get with -Wmaybe-uninitialized and my code 
> is a false positive.  In particular, I see things like
> 
> scat.f90:309:0: warning: 'barray.dim[0].ubound' may be used uninitialized
> in this function [-Wmaybe-uninitialized]
>       barray = 0
> ^
> scat.f90:309:0: warning: 'barray.dim[0].lbound' may be used uninitialized
> in this function [-Wmaybe-uninitialized]
> 
> where barray.dim[0].ubound is clearly a internally generated entity.
> A normal user may be confused by such warnings.

There’s a PR somewhere about that, but I think it requires middle-end knowledge to fix.

FX



More information about the Fortran mailing list