This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] Fix gcjh handling of most negative int/longs


Jakub Jelinek writes:

 > On 64-bit hosts jint type is apparently 64-bit

No.

 > (javaop.h has
 > #ifndef int32
 > #define int32 long
 > #endif
 > ...
 > typedef int32                   jint;

That's right.  jint is 32 bit, always.

 > ), but the following hunk in print_field_info relies on it being
 > 64-bit.  Either we could change jint to be always exactly 32-bit
 > type on all hosts, or we need something like the patch below,
 > otherwise headers generated by 64-bit gcjh generate warnings in 32-bit
 > compilation.

jint is defined as 

  typedef __java_int jint;

__java_int is defined as

gcc/cp/decl.c:  java_int_type_node = record_builtin_java_type ("__java_int", 32);

Andrew.


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