------- 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29087