This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18501] [4.1/4.2/4.3 Regression] Missing 'used unintialized' warning
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2007 11:41:42 -0000
- Subject: [Bug tree-optimization/18501] [4.1/4.2/4.3 Regression] Missing 'used unintialized' warning
- References: <bug-18501-361@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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