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 c/12150] [3.3/3.4 regression] warning in dead code (comparison is always false) [regression]


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-03 16:35 -------
It might be a regression but as I said this did not warn either (so is this a regression too because it 
does warn, no it is not):
unsigned f(unsigned x)
{
   return x >= 1ull << 32 ? 1 : 0;
}
The problem is the front-end warns as it is building the tree so really there is no way of knowing if 
the code is reachable or not.
Also this is minor at least.  Also the code where this warns is common between all C based 
(C,ObjC, and C++)





I still say this is not a regression as there is no way (at least currently) to know when the front-end 
warns if the code is not reachable (dead).


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