C++: __java_double expressions promote to float

Jason Merrill jason@redhat.com
Wed Apr 10 09:47:00 GMT 2002


>>>>> "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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /