This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++: __java_double expressions promote to float




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]