Wrong warnings when -fgcse is active
Jeffrey A Law
law@cygnus.com
Sun Jul 5 23:39:00 GMT 1998
In message < 199807031433.QAA05423@achibm5.chemie.uni-karlsruhe.de >you write:
> val and variant are initialized at the point of declaration, they
> can't possibly be used uninitialized. And if gcse changes that somehow
> then it is broken.
Not necessarily.
First you have to realize that the compiler can't determine with 100%
reliability when something is initialized or not. So, if it can not
provide a variable is initialized, then it will assume that it is
uninitialized.
GCSE moves things around in the flowgraph in such a way that it can make
it appear like a variable is uninitialized to the rather simplistic
warning code. This is not a bug in gcse, but a failing in the code
to find uninitialized variables.
jeff
More information about the Gcc-bugs
mailing list