This is the mail archive of the java-patches@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++ PATCH: 14035


Andreas Schwab writes:
 > Mark Mitchell <mark@codesourcery.com> writes:
 > 
 > > This patch fixes PR c++/14035.  This PR was opened because of a cast
 > > where we generated wrong-code for a C-style cast.  In particular, we
 > > generated a copy constructor call instead of a derived-to-base
 > > conversion.
 > 
 > This cause libjava to no longer build on ia64-linux:
 > 
 > ../../../libjava/java/lang/natClass.cc: In function `void _Jv_LayoutVTableMethods(java::lang::Class*)':
 > ../../../libjava/java/lang/natClass.cc:1823: error: cast from 'java::lang::Class*' to 'int' loses precision
 > ../../../libjava/java/lang/natClass.cc:1831: error: cast from 'java::lang::Class*' to 'int' loses precision
 > ../../../libjava/java/lang/natClassLoader.cc: In function `void _Jv_PrepareCompiledClass(java::lang::Class*)':
 > ../../../libjava/java/lang/natClassLoader.cc:134: error: cast from 'java::lang::Class*' to 'int' loses precision
 > ../../../libjava/java/lang/natClassLoader.cc:139: error: cast from 'java::lang::Class*' to 'int' loses precision
 > 
 > The casts to int should probably be changed to casts to uaddr.

Yes, that is OK.  size_t would be just as good.

Andrew.


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