aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-parser.c')
-rw-r--r--gcc/c/c-parser.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 69ecdb5..b9fdc90 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -10615,8 +10615,14 @@ c_parser_expression (c_parser *parser)
c_parser_consume_token (parser);
expr_loc = c_parser_peek_token (parser)->location;
lhsval = expr.value;
- while (TREE_CODE (lhsval) == COMPOUND_EXPR)
- lhsval = TREE_OPERAND (lhsval, 1);
+ while (TREE_CODE (lhsval) == COMPOUND_EXPR
+ || TREE_CODE (lhsval) == NOP_EXPR)
+ {
+ if (TREE_CODE (lhsval) == COMPOUND_EXPR)
+ lhsval = TREE_OPERAND (lhsval, 1);
+ else
+ lhsval = TREE_OPERAND (lhsval, 0);
+ }
if (DECL_P (lhsval) || handled_component_p (lhsval))
mark_exp_read (lhsval);
next = c_parser_expr_no_commas (parser, NULL);