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]
Other format: [Raw text]

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



------- 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


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