public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Mathieu Malaterre <mathieu.malaterre@gmail.com>
Cc: Florian Weimer <fw@deneb.enyo.de>, java@gcc.gnu.org
Subject: Re: error: 'jvariant::jvariant(jbyte)' cannot be overloaded
Date: Tue, 21 Jul 2009 07:49:00 -0000	[thread overview]
Message-ID: <4A6572E0.2060006@redhat.com> (raw)
In-Reply-To: <bf0c3b3f0907210016w50a4201oebec02bb77ecba3e@mail.gmail.com>

On 07/21/2009 08:16 AM, Mathieu Malaterre wrote:
> On Sun, Jul 19, 2009 at 5:16 PM, Andrew Haley<aph@redhat.com> wrote:
>> On 07/19/2009 09:17 AM, Florian Weimer wrote:
>>> * Andrew Haley:
>>>
>>>> On 07/19/2009 07:02 AM, Florian Weimer wrote:
>>>>> * Mathieu Malaterre:
>>>>>
>>>>>>   I am trying to compile VTK using gcj and I am getting those compiler
>>>>>> error, could someone please let me know if the code is legal (should
>>>>>> compile) or not:
>>>>> This is legal per Sun's JNI specficiation: jboolean and jbyte are
>>>>> distinct types because there signedness differs:
>>>>>
>>>>> <http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/types.html#wp198>
>>>>>
>>>>> It's a bug in GCC.
>>>> I didn't see the original message to which this is replying.
>>> It's about C++ code which contains a function overloaded on jbyte and
>>> jboolean.  This fails with GCJ because they are typedef'ed to the same
>>> type.
>>>
>>>> If you can make a test case I'll see if the bug can be fixed.
>>> Compare the table I referenced with these pieces from jni_md.h:
>>>
>>> | typedef int    jbyte  __attribute__((__mode__(__QI__)));
>>> | 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 short jchar __attribute__((__mode__(__HI__)));
>>> | typedef float  jfloat;
>>> | typedef double jdouble;
>>> | typedef jint jsize;
>>>
>>> | typedef int8_t jbyte;
>>> | typedef int16_t jshort;
>>> | typedef int32_t jint;
>>> | typedef int64_t jlong;
>>> | typedef float jfloat;
>>> | typedef double jdouble;
>>> | typedef jint jsize;
>>> | typedef int8_t jboolean;
>>> | typedef uint16_t jchar;
>>>
>>> jboolean is signed, but Sun's spec says it should be unsigned.
>> OK.  I can fix it, but it's an ABI-incompatible change.  There's no
>> way this fix could be applied to any existing releases, only gcc
>> 4.5.
> 
> Excellent ! Is there a bug entry so I can follow the process ?

Not until you make one.

Andrew.

  reply	other threads:[~2009-07-21  7:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16 12:38 Mathieu Malaterre
2009-07-19  6:02 ` Florian Weimer
2009-07-19  7:52   ` Andrew Haley
2009-07-19  8:17     ` Florian Weimer
2009-07-19 15:17       ` Andrew Haley
2009-07-19 18:53         ` Florian Weimer
2009-07-20  8:17           ` Andrew Haley
2009-07-20  8:28             ` Florian Weimer
2009-07-21  7:17         ` Mathieu Malaterre
2009-07-21  7:49           ` Andrew Haley [this message]
2009-07-21  8:45             ` Mathieu Malaterre

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=4A6572E0.2060006@redhat.com \
    --to=aph@redhat.com \
    --cc=fw@deneb.enyo.de \
    --cc=java@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).