Re: [fortran, patch] Document the interaction of -finit-{real,integer,…} and -Wuninitialized
Tobias Burnus
burnus@net-b.de
Tue Nov 8 08:43:00 GMT 2011
On 11/08/2011 08:55 AM, FX wrote:
> The attached patch documents the fact that using the -finit-* options will silence -Wuninitialized warnings.
Good idea. (And approved by Janne.)
> I don't think that's unreasonable [...], so I intend to close the PR after committing.
I think one could distinguish between front-end warnings, where the FE
keeps track of uninitialized variables, and middle-end warnings. The
-finit-* flags surely have to silence ME warnings. However, they should
not affect FE warnings. I think we essentially do not have any FE
uninitialized diagnostic, but one could consider adding one. That would
help in some cases [like this one - or when the ME lacks information
about the Fortran semantic], though I do not want to do a full flow
analysis. It would be more like the current FE "variable is unused"
warning where one simply sets a flag when the value of a variable gets
references (for unused) or set (for uninitialized), one could even
combine it to set but not used.
Tobias
More information about the Fortran
mailing list