[Bug java/40816] New: error: 'jvariant::jvariant(jbyte)' cannot be overloaded

View: New views
2 Messages — Rating Filter:   Alert me  

[Bug java/40816] New: error: 'jvariant::jvariant(jbyte)' cannot be overloaded

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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.


--
           Summary: error: 'jvariant::jvariant(jbyte)' cannot be overloaded
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mathieu dot malaterre at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40816


[Bug java/40816] error: 'jvariant::jvariant(jbyte)' cannot be overloaded

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



------- Comment #1 from mathieu dot malaterre at gmail dot com  2009-10-27 09:43 -------
Copying from the mailing list:


from    Andrew Haley <aph@...>
to      Tom Tromey <tromey@...>
cc      java@...
date    Mon, Oct 19, 2009 at 5:03 PM
subject Re: Is gcj dead?
mailing list    <java.gcc.gnu.org> Filter messages from this mailing list
unsubscribe     Unsubscribe from this mailing-list

hide details Oct 19 (8 days ago)

- Show quoted text -
Mathieu Malaterre wrote:

> On Mon, Oct 19, 2009 at 3:10 PM, Andrew Haley <aph@...> wrote:
>> Mathieu Malaterre wrote:
>>> On Mon, Oct 19, 2009 at 3:00 PM, Andrew Haley <aph@...> wrote:
>>>> Mathieu Malaterre wrote:
>>>>> On Sun, Oct 18, 2009 at 12:08 PM, Andrew Haley <aph@...> wrote:
>>>>>> Yuri wrote:
>>>>>>> Last news in http://gcc.gnu.org/java/ are dated March 2007.
>>>>>> Yes, we should update that.  There hasn't been a lot of  new gcj development,
>>>>>> but it is maintained.
>>>>>>
>>>>>>> Also I submitted few PRs a month ago and there is no response at all.
>>>>>> Which ones?
>>>>> How about this one:
>>>>>
>>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40816
>>>> I am still rather nervous about that one, as it's an ABI change.
>>> Point taken.
>>> In the long term this will prevent compilation of package such as VTK
>>> on debian on arch such as HPPA.
>> Really?  That's all rather amazing.  Is there no simple workaround?
>
> Compilation error can be found here:
>
> http://www.vtk.org/pipermail/vtk-developers/2009-June/006110.html
>
> And source:
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Graphics/vtkJVMManager.h?view=annotate
>
> I really do not see how I can work around that. Simply removing one of
> the multiple signature is not a solution IMHO.

Yes, I see what's going on.

To Tom Tromey: This is an ABI change, but AFAICS the only time it makes
a difference is where it's already broken.  I'm tempted to make the change
now.

Andrew.


--

mathieu dot malaterre at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mathieu dot malaterre at
                   |                            |gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40816