Commit 19d6ff23 by Richard Henderson Committed by Richard Henderson

c-parse.in (expr_no_commas): Verify we've an expr before calling C_SET_EXP_ORIGINAL_CODE.

        * c-parse.in (expr_no_commas): Verify we've an expr before
        calling C_SET_EXP_ORIGINAL_CODE.

From-SVN: r26590
parent 5ad9b85f
Sat Apr 24 17:26:43 1999 Richard Henderson <rth@cygnus.com>
* c-parse.in (expr_no_commas): Verify we've an expr before
calling C_SET_EXP_ORIGINAL_CODE.
Thu Apr 22 22:22:15 EDT 1999 John Wehle (john@feith.com)
* toplev.c (rest_of_compilation): Always set
......
......@@ -604,12 +604,22 @@ expr_no_commas:
{ skip_evaluation -= $1 == boolean_true_node;
$$ = build_conditional_expr ($1, $<ttype>2, $5); }
| expr_no_commas '=' expr_no_commas
{ $$ = build_modify_expr ($1, NOP_EXPR, $3);
C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); }
{ char class;
$$ = build_modify_expr ($1, NOP_EXPR, $3);
class = TREE_CODE_CLASS (TREE_CODE ($$));
if (class == 'e' || class == '1'
|| class == '2' || class == '<')
C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR);
}
| expr_no_commas ASSIGN expr_no_commas
{ $$ = build_modify_expr ($1, $2, $3);
{ char class;
$$ = build_modify_expr ($1, $2, $3);
/* This inhibits warnings in truthvalue_conversion. */
C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); }
class = TREE_CODE_CLASS (TREE_CODE ($$));
if (class == 'e' || class == '1'
|| class == '2' || class == '<')
C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK);
}
;
primary:
......
......@@ -559,12 +559,22 @@ expr_no_commas:
{ skip_evaluation -= $1 == boolean_true_node;
$$ = build_conditional_expr ($1, $<ttype>2, $5); }
| expr_no_commas '=' expr_no_commas
{ $$ = build_modify_expr ($1, NOP_EXPR, $3);
C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); }
{ char class;
$$ = build_modify_expr ($1, NOP_EXPR, $3);
class = TREE_CODE_CLASS (TREE_CODE ($$));
if (class == 'e' || class == '1'
|| class == '2' || class == '<')
C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR);
}
| expr_no_commas ASSIGN expr_no_commas
{ $$ = build_modify_expr ($1, $2, $3);
{ char class;
$$ = build_modify_expr ($1, $2, $3);
/* This inhibits warnings in truthvalue_conversion. */
C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); }
class = TREE_CODE_CLASS (TREE_CODE ($$));
if (class == 'e' || class == '1'
|| class == '2' || class == '<')
C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK);
}
;
primary:
......
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