C++: __java_double expressions promote to float

Andrew Haley aph@cambridge.redhat.com
Wed Apr 10 10:14:00 GMT 2002


Jason Merrill writes:
 > >>>>> "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);
Okay, I'll do that too.
Andrew.


More information about the Java mailing list

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