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: Java name-mangling


> Unfortunately, the code depends on various aspects of the C++
> front-end -- it nees to know about templates, overloaded operators,
> and other C++-specific bits.  Factoring the code will be difficult,
> and will lead to code that is considerably less clear.

Would it be possible to share the exact same source code, but compile
it differently for use in jc1? E.g. in the java directory, define

#define DECL_USE_TEMPLATE(NODE)          0
#define CLASSTYPE_TI_ARGS(NODE)          NULL_TREE
#define DECL_NAMESPACE_STD_P(NODE)       0

etc. Compiling it twice may sound like a hack, but these macros
actually correctly explain the Java language to the mangler (i.e. no
declaration has template arguments, no declaration is in namespace
std, etc).

Regards,
Martin


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