This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Clobbered warning for -Wall
- To: "'bug-gcc at gnu dot org'" <bug-gcc at gnu dot org>
- Subject: Clobbered warning for -Wall
- From: Tim Bedding <tim at polyhedra dot com>
- Date: Tue, 26 Oct 1999 16:06:10 +-100
- Encoding: 36 TEXT
I have just checked the latest documentation for gcc
and it appears that the bug that I reported has been fixed.
I said that -Wall should not generate the clobbered warning.
However, the current documentation says that -Wall implies
-Wuninitialized which is the behaviour that I obtained with
2.95 of gcc.
invoke.texi:
> These warnings are possible only in optimizing compilation,
> because they require data flow information that is computed only
> when optimizing. If you don't specify @samp{-O}, you simply won't
> get these warnings.
I wonder whether it might be an idea to expand on this a little.
I was thinking of something like:
Thus, the compiler can actually be stricter when optimizing.
If you need to be strict, you will need to turn on optimization.
I also noticed this.
> These warnings occur only for variables that are candidates for
> register allocation.
I think that if this is the implementation, then it is not ideal.
I would have thought that even if a variable is not put in a register,
it can still be clobbered on the stack.
Am I right?
Cordially
Tim