This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52283] "error: case label does not reduce to an integer constant" for constant folded cast expr
- From: "chrbr at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Feb 2012 11:58:28 +0000
- Subject: [Bug c/52283] "error: case label does not reduce to an integer constant" for constant folded cast expr
- Auto-submitted: auto-generated
- References: <bug-52283-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52283
--- Comment #11 from chrbr at gcc dot gnu.org 2012-02-20 11:58:28 UTC ---
The problem stems from the unconditional forcing of TREE_NO_WARNING in
convert_to_integer. This was done to fix PR26632. I don't see how such a
forcing can be correct, since the NO_WARNING on a constant would depend on the
fact that is casted or not, regardless of the use of the expression in the
front end.