aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2025-01-02 17:36:54 +0100
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-01-13 11:52:56 +0100
commit26b649b2d17dccf0f4c3c048f37c49660aad7f71 (patch)
treea1e7c0ffa9c6fadcffd5f8fb5955a8ab334c5b1f /gcc/expr.cc
parentd3904a3ad9d7b4c8e5e536e5166b89548510fd48 (diff)
downloadgcc-26b649b2d17dccf0f4c3c048f37c49660aad7f71.zip
gcc-26b649b2d17dccf0f4c3c048f37c49660aad7f71.tar.gz
gcc-26b649b2d17dccf0f4c3c048f37c49660aad7f71.tar.bz2
ada: Fix parsing of raise expressions with no parens
According to Ada grammar, raise expression is an expression, but requires parens to be a simple_expression. We wrongly classified raise expressions as expressions, because we mishandled a global state variable in the parser. This patch causes some illegal code to be rejected. gcc/ada/ChangeLog: * par-ch4.adb (P_Relation): Prevent Expr_Form to be overwritten when parsing the raise expression itself. (P_Simple_Expression): Fix manipulation of Expr_Form.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions