aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-11-23 13:42:47 -0800
committerAndrew Pinski <quic_apinski@quicinc.com>2024-11-24 11:46:17 -0800
commite9f3eb8493c66da143561d6b866c4b3204e42574 (patch)
tree05a1d512957af42754689744bae05862fc0e8d2e /gcc/function.cc
parentab952929f7741998e3f28959c85e7abbf88ea79f (diff)
downloadgcc-e9f3eb8493c66da143561d6b866c4b3204e42574.zip
gcc-e9f3eb8493c66da143561d6b866c4b3204e42574.tar.gz
gcc-e9f3eb8493c66da143561d6b866c4b3204e42574.tar.bz2
gimplefe: Fix handling of ')'/'}' after a parse error [PR117741]
The problem here is c_parser_skip_until_found stops at a closing nesting delimiter without consuming it. So if we don't consume it in c_parser_gimple_compound_statement, we would go into an infinite loop. The C parser similar code in c_parser_statement_after_labels to handle this specific case too. PR c/117741 gcc/c/ChangeLog: * gimple-parser.cc (c_parser_gimple_compound_statement): Handle CPP_CLOSE_PAREN/CPP_CLOSE_SQUARE with an error and skipping the token. gcc/testsuite/ChangeLog: * gcc.dg/gimplefe-54.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions