--- Comment #7 from rguenth at gcc dot gnu dot org 2009-06-04 11:16 ---
Oh, 4.4 and 4.5 already work.
*** This bug has been marked as a duplicate of 39371 ***
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
-
--- Comment #6 from paolo dot carlini at oracle dot com 2009-06-04 10:45
---
Note that 3_4-branch, 4_0-branch, 4_1-branch, 4_2-branch are all closed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40335
--- Comment #5 from shenrfen at gmail dot com 2009-06-04 10:24 ---
Thanks very much.
Waiting for your patch. the patch of gcc3.3.5 is also expected if you have
enough time to do it. it should be similar with gcc4.**
Thanks agian.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40335
--- Comment #4 from rguenth at gcc dot gnu dot org 2009-06-04 10:05 ---
GCC 3.3 is very old and no longer maintained.
> g++-4.4 -o t t.C
t.C: In function int main():
t.C:9: warning: case label value exceeds maximum value for type
which seems indeed bogus (but hints at what happens).
--- Comment #3 from shenrfen at gmail dot com 2009-06-04 09:47 ---
I have debug the C++ front-end of gcc3.3.5.
In function finish_switch_cond:
if (cond != error_mark_node)
{
cond = default_conversion (cond);
cond = fold (build1 (CLEANUP_POINT_EXPR, TREE
--- Comment #2 from shenrfen at gmail dot com 2009-06-04 09:09 ---
The expected result should be -1, not 255.
But the result is 255 when I use g++ to compiling this code.
--
shenrfen at gmail dot com changed:
What|Removed |Added
---
--- Comment #1 from rguenth at gcc dot gnu dot org 2009-06-04 09:04 ---
Integral promotion is performed on the switch argument, thus signed char -1
is sign-extended to int -1. You probably want (unsigned char) i instead.
--
rguenth at gcc dot gnu dot org changed:
What