This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran] PATCH: Fix PR 15510
Paul Brook wrote:
On Wednesday 09 June 2004 19:09, Tobias Schlüter wrote:The "variable unused" warning is optimization independent, it means the
variable doesn't appear in an expression, so it can be front-end only.
For the "var is never assigned a value" kind of warnings the more
elaborate mechanism of the back-end are necessary, I agree.
I'm wondering if this code shouldn't be moved to the resolution stage,
as this would allow for better error printing because we could print out
the loci where the variable is declared. Possibly we can only do this
after PR 15481 is fixed.
Maybe. IIRC the C frontends currently use information from the optimizers to
generate unused uninitialized variable warnings. There's some discussion on
whether this is a good idea or not (it gives better diagnostics, but depends
on optimization levels). We should do the same if/when a conclusion is