From: Andrew Haley <aph@redhat.com>
To: Mathieu Malaterre <mathieu.malaterre@gmail.com>
Cc: Florian Weimer <fw@deneb.enyo.de>,
GCJ-patches <java-patches@gcc.gnu.org>
Subject: jboolean is an unsigned type
Date: Wed, 24 Feb 2010 15:34:00 -0000 [thread overview]
Message-ID: <4B8546E0.40700@redhat.com> (raw)
In-Reply-To: <bf0c3b3f0907210144g51dc6861nad9b29574e43ac93@mail.gmail.com>
This fixes a bug that goes back many, many years.
Inside the compiler jboolean is an unsigned type, but in the library
jboolean is a signed type. We got away with this by accident.
I've done a fair bit of testing, and I'm pretty sure this won't break
any BC-compiled programs: none of the signatures change, for example.
It is possible that some CNI programs that hitherto have worked by
accident will break; we'll see.
Andrew.
2010-02-24 Andrew Haley <aph@redhat.com>
PR java/40816
* include/jni_md.h: jboolean is an unsigned type.
Index: include/jni_md.h
===================================================================
--- include/jni_md.h (revision 157011)
+++ include/jni_md.h (working copy)
@@ -78,7 +78,7 @@
typedef int jshort __attribute__((__mode__(__HI__)));
typedef int jint __attribute__((__mode__(__SI__)));
typedef int jlong __attribute__((__mode__(__DI__)));
-typedef int jboolean __attribute__((__mode__(__QI__)));
+typedef unsigned int jboolean __attribute__((__mode__(__QI__)));
typedef unsigned short jchar __attribute__((__mode__(__HI__)));
typedef float jfloat;
typedef double jdouble;
@@ -99,7 +99,7 @@
typedef float jfloat;
typedef double jdouble;
typedef jint jsize;
-typedef int8_t jboolean;
+typedef uint8_t jboolean;
typedef uint16_t jchar;
# else /* JV_HAVE_INTTYPES_H */
parent reply other threads:[~2010-02-24 15:34 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <bf0c3b3f0907210144g51dc6861nad9b29574e43ac93@mail.gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B8546E0.40700@redhat.com \
--to=aph@redhat.com \
--cc=fw@deneb.enyo.de \
--cc=java-patches@gcc.gnu.org \
--cc=mathieu.malaterre@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).