This is the mail archive of the gcc-bugs@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: g++ -vs Java boolean


Mark> This strikes me as the best solution.  I'm not sure the __mode__
Mark> thing will work

Out of interest I tried it.  I put this into javaprims.h:

  typedef bool jboolean __attribute__ ((__mode__ (__byte__)));

and rebuilt libgcj.  Well, tried to rebuild it.  It fails with many
errors of this form:

    java/lang/String.h:28: Java method 'java::lang::String::equals(java::lang::Object *)' has non-Java return type `jboolean'

That makes sense, since there is no way to tell that jboolean is a
"Java" type.

So it seems to me that some sort of g++ tweak will be required to make
even this approach work.  Comments?  A patch?  I'm willing to do the
testing...

Tom


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