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

dewar@gnat.com dewar@gnat.com
Fri Aug 31 11:25:00 GMT 2001


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

To be clear, it is definitely technically possible to compile C or C++ into
JBC (as we know from our work on JGNAT which does this for Ada 95), but indeed
it is a large effort -- probably quite a bit of the thinking behind JGNAT
would be transferrable, since many of the problems (representing pointers
to variables, pointers to procedures, involve similar considerations).



More information about the Gcc mailing list