[Bug tree-optimization/18501] [4.1/4.2/4.3 Regression] Missing 'used unintialized' warning

manu at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Mar 6 11:41:00 GMT 2007



------- Comment #13 from manu at gcc dot gnu dot org  2007-03-06 11:41 -------
(In reply to comment #4)
> This is not really fixable.
> 
> Analysis: http://gcc.gnu.org/ml/gcc/2004-12/msg00681.html

I am really ignorant on this CCP optimisaton but I am willing to learn. I guess
that we merge UNDEFINED and 0 because we can assume that undefined is anything.
I am not so sure that is OK in this particular case. However, even in that
case, we should warn just at that moment, since we are already using an
UNDEFINED value, aren't we?

My point is that this testcase is fundamentally different from:
  int x;
  if (f())
    x = 3;
  return x;

where f() is optimised away because it is always true. Some users may not want
to get warnings for the latter case, but any reasonable user wants to get a
warning for this PR.

Please, correct me when I am wrong. Thanks.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18501



More information about the Gcc-bugs mailing list