This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
- From: "emailwastefilter-bugzillagccorg at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jul 2005 18:03:49 -0000
- Subject: [Bug c++/22551] [4.0/4.1 Regression] [ICE] in tree_low_cst, at tree.c:3843
- References: <20050718171941.22551.emailwastefilter-bugzillagccorg@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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