C++: __java_double expressions promote to float

Mark Mitchell mark@codesourcery.com
Wed Apr 10 01:20:00 GMT 2002


--On Tuesday, April 09, 2002 6:51 PM +0100 Andrew Haley 
<aph@cambridge.redhat.com> wrote:
> TYPE_MAIN_VARIANT for __java_double is __java_double.
> type_after_usual_arithmetic_conversions() doesn't know anything about
> that type, so it converts to float. Therefore, expressions whose
> operands are all of type __java_double are of type float. I think
> that's wrong...

Definitely.
Here we are in nasty extension land again, though. What should an
operation involving a long double and a __java_double promote to?
Your patch is fine, if the semantics it gives are the ones you want,
but you should also add documentation under C++ language extensions
that documents this type and its behavior.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


More information about the Java mailing list

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