------- Additional Comments From emailwastefilter-bugzillagccorg at yahoo dot 
com  2005-07-18 18:03 -------
(In reply to comment #2)
> Hmm, 0x80000000+1 overflows which is invalid for constant expressions and
really should be 
> rejected.

The warnings seem on the money, but they should not cause the compiler to crash,
right?

The original code used 0xFFFE0000 in place of 0x80000000 and had around 26
warning messages before it crashed.  If there are only 4 warning messages, then
the compiler completes without crashing.  Starting with 0x80000000 - 2 lets the
compiler complete, as does commenting out one of the case statements.

Several obivous ways around this code are to use an enum, an unsigned int, or an
if-else if cascasde.  These all result in no warnings, the first two justly, the
last I'm not so sure.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22551
  • [Bug c++/22551] [4.0/4.1 ... emailwastefilter-bugzillagccorg at yahoo dot com

Reply via email to