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


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

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




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

No.  Gcj can do any of:

java source -> java bytecode
java source -> native object
java bytecode -> native object

It doesn't understand C/C++ syntax at all.  I suppose one could consider
implementing -femit-class-files on the c++ frontend, though I suspect
mapping the trees to legal java bytecode could be exceedingly difficult.
Java bytecode is really poorly suited to be a general-purpose IR.

Jeff


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