Can gcj cross compile C / C++ programs into java byte code?

Tom Tromey tromey@redhat.com
Fri Aug 31 09:08:00 GMT 2001


>>>>> "Johan" == Johan Walles <johan.walles@appeal.se> writes:

Johan> I've read the FAQ at " http://gcc.gnu.org/java/faq.html" ;, but
Johan> the question isn't answered there.  Can gcj cross compile C /
Johan> C++ programs into java byte code?  Why (not)?

No, it can't.

Java bytecode doesn't have pointers and other features that are
assumed by C and C++.  Compiling C or C++ to the JVM would require a
fair amount of runtime work as well (for example, Java classes to
represent C pointers).

Tom



More information about the Gcc mailing list