Commit 29df70e6 by Jim Wilson

(internal_build_compound_expr): When pedantic...

(internal_build_compound_expr): When pedantic, don't
simplify a COMPOUND_EXPR, so that it won't be mistaken for an
lvalue or an integer constant expression.

From-SVN: r4102
parent fa5679bb
...@@ -3788,7 +3788,9 @@ internal_build_compound_expr (list, first_p) ...@@ -3788,7 +3788,9 @@ internal_build_compound_expr (list, first_p)
rest = internal_build_compound_expr (TREE_CHAIN (list), FALSE); rest = internal_build_compound_expr (TREE_CHAIN (list), FALSE);
if (! TREE_SIDE_EFFECTS (TREE_VALUE (list))) /* When pedantic, a compound expression can be neither an lvalue
nor an integer constant expression. */
if (! TREE_SIDE_EFFECTS (TREE_VALUE (list)) && ! pedantic)
return rest; return rest;
return build (COMPOUND_EXPR, TREE_TYPE (rest), TREE_VALUE (list), rest); return build (COMPOUND_EXPR, TREE_TYPE (rest), TREE_VALUE (list), rest);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment