[Bug c++/29087] [4.1/4.2 Regression] More than 35000 switch cases crash cc1plus

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Sep 15 21:01:00 GMT 2006

------- Comment #4 from steven at gcc dot gnu dot org  2006-09-15 21:01 -------
Created an attachment (id=12279)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12279&action=view)
tentative patch

This removes the recursion cycle
"cp_parser_statement -> cp_parser_labeled_statement -> cp_parser_statement"
but it does not at this moment solve the whole problem because recursion of the
form "cp_parser_statement -> cp_parser_statement" still occurs.  With a minor
change, the two new calls in the patch to cp_parser_statement from itself could
be replaced with "goto restart;" to hard-code the obvious tail recursion
opportunity.  I may try that later.  For now, this patch is being tested (by
Eric Christopher at Apple) and I hope we'll get good results with it.



More information about the Gcc-bugs mailing list