This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/52283] "error: case label does not reduce to an integer constant" for constant folded cast expr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52283

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-16 19:00:28 UTC ---
(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.

> I wouldn't be surprised if the compiler got noticeably faster by removing all
> early folding and all the workarounds and hacks that come with it, and

The C FE these days doesn't perform the folding right away, it fully folds only
when needed (for some extension, or when passing down expressions to the
gimplifier).  And no, the C FE isn't anywhere on the radar compile time wise on
the vast majority of code (the C++ FE on the other side does still a lot of
folding (some unnecessary, some needed) early, on some sources the FE already
shows in compile time usage, but the folding in it doesn't).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]