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: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Feb 2012 20:09:43 +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 #8 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-02-16 20:09:43 UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > Is this folding actually necessary for anything beyond diagnostics? I thought
> > it was agreed that folding in the FEs was EVIL and we should stop doing it.
>
> Yes, in various places some folding is needed for language semantics, in other
> places for various extensions. The C FE does far less folding then it did.
Talking about this particular case (folding in build_c_cast), is this actually
needed here? Couldn't GCC just delay folding until actually needed?