summaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-19 20:55:27 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-19 20:55:27 +0000
commit6163a12583f18b52e52e31f9084fe6d51b6f675c (patch)
tree1e0b709ce5a70aacdf2f57b1ae07b31bd68bf02e /gcc/c-parser.c
parentf1556d890022ee37b09cbce9b1d513188099ec57 (diff)
downloadgcc-6163a12583f18b52e52e31f9084fe6d51b6f675c.tar.gz
./:
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 0fc1abb5119..29e399fcdc1 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;