This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++: __java_double expressions promote to float
>>>>> "Andrew" == Andrew Haley <aph@cambridge.redhat.com> writes:
> 2002-04-10 Andrew Haley <aph@cambridge.redhat.com>
> * typeck.c (type_after_usual_arithmetic_conversions):
> When two floating-point operands have the same precision:
> convert to float if one of the operands is float;
> if neither operand is one of the standard types, return the type
> of the first operand.
OK.
>> Also, the function should check for the types actually being the same up
>> where it tests for different precisions; no need to get fancy in that case.
> Pardon?
if (TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2))
return build_type_attribute_variant (t1, attributes);
Jason