Commit f519a452 by Gabriel Dos Reis Committed by Gabriel Dos Reis

c-typeck.c (build_conditional_expr): Handle complex data types.

2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>

        * c-typeck.c (build_conditional_expr): Handle complex data types.

From-SVN: r34422
parent 258a120b
2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
* c-typeck.c (build_conditional_expr): Handle complex data types.
2000-06-05 Jason Merrill <jason@casey.soma.redhat.com> 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
* explow.c (maybe_set_unchanging): New function, broken out from... * explow.c (maybe_set_unchanging): New function, broken out from...
......
...@@ -3358,8 +3358,10 @@ build_conditional_expr (ifexp, op1, op2) ...@@ -3358,8 +3358,10 @@ build_conditional_expr (ifexp, op1, op2)
else else
result_type = TYPE_MAIN_VARIANT (type1); result_type = TYPE_MAIN_VARIANT (type1);
} }
else if ((code1 == INTEGER_TYPE || code1 == REAL_TYPE) else if ((code1 == INTEGER_TYPE || code1 == REAL_TYPE
&& (code2 == INTEGER_TYPE || code2 == REAL_TYPE)) || code1 == COMPLEX_TYPE)
&& (code2 == INTEGER_TYPE || code2 == REAL_TYPE
|| code2 == COMPLEX_TYPE))
{ {
result_type = common_type (type1, type2); result_type = common_type (type1, type2);
......
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