This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Clobbered warning for -Wall


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]