diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-06-19 20:55:27 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-06-19 20:55:27 +0000 |
commit | d130ae115657aa4e4c4dab6e56f3c08d44bcdfa8 (patch) | |
tree | 1e0b709ce5a70aacdf2f57b1ae07b31bd68bf02e /gcc/c-parser.c | |
parent | 502c4bb950b3f5f0b1089800123acadf595e12b4 (diff) | |
download | gcc-d130ae115657aa4e4c4dab6e56f3c08d44bcdfa8.zip gcc-d130ae115657aa4e4c4dab6e56f3c08d44bcdfa8.tar.gz gcc-d130ae115657aa4e4c4dab6e56f3c08d44bcdfa8.tar.bz2 |
tree-cfg.c (gimple_redirect_edge_and_branch): Change ERROR_MARK to GIMPLE_ERROR_MARK.
./: * tree-cfg.c (gimple_redirect_edge_and_branch): Change ERROR_MARK
to GIMPLE_ERROR_MARK.
* c-typeck.c (build_conditional_expr): Add op1_original_type and
op2_original_type parameters. Warn about using different enum
types.
* c-parser.c (c_parser_conditional_expression): Pass original
types to build_conditional_expr.
* c-tree.h (build_conditional_expr): Update declaration.
testsuite/:
* gcc.dg/Wcxx-compat-18.c: New testcase.
From-SVN: r148727
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 0fc1abb..29e399f 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -4597,7 +4597,8 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after) c_inhibit_evaluation_warnings -= cond.value == truthvalue_true_node; ret.value = build_conditional_expr (colon_loc, cond.value, cond.original_code == C_MAYBE_CONST_EXPR, - exp1.value, exp2.value); + exp1.value, exp1.original_type, + exp2.value, exp2.original_type); ret.original_code = ERROR_MARK; if (exp1.value == error_mark_node || exp2.value == error_mark_node) ret.original_type = NULL; |