public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/2332: valid declaration rejected
@ 2001-03-21 11:36 Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2001-03-21 11:36 UTC (permalink / raw)
To: tromey; +Cc: gcc-prs
The following reply was made to PR java/2332; it has been noted by GNATS.
From: Tom Tromey <tromey@redhat.com>
To: apbianco@cygnus.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/2332: valid declaration rejected
Date: 21 Mar 2001 12:42:38 -0700
>> public foo (Object[] v[])
Alex> There was code in place to handle this type of old fashioned
Alex> declaration. I'll have a look.
I just updated the PR. I have an old approved patch which fixes this.
I don't like the patch much, but I will probably commit it anyway.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: java/2332: valid declaration rejected
@ 2001-03-20 14:06 Alexandre Petit-Bianco
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Petit-Bianco @ 2001-03-20 14:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/2332; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: tromey@redhat.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/2332: valid declaration rejected
Date: Tue, 20 Mar 2001 13:59:05 -0800 (PST)
tromey@redhat.com writes:
> public foo (Object[] v[])
There was code in place to handle this type of old fashioned
declaration. I'll have a look.
./A
^ permalink raw reply [flat|nested] 3+ messages in thread
* java/2332: valid declaration rejected
@ 2001-03-20 13:46 tromey
0 siblings, 0 replies; 3+ messages in thread
From: tromey @ 2001-03-20 13:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 2332
>Category: java
>Synopsis: valid declaration rejected
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Mar 20 13:46:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Tom Tromey
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
This ugly example is derived from the Apache javax.servlet
code:
public class foo {
Object[][] vals;
public foo (Object[] v[])
{
vals = v;
}
}
I believe this is valid (if hideous) Java code.
However gcj rejects it:
creche. gcj --syntax-only foo.java
foo.java: In class `foo':
foo.java: In method `(java.lang.Object[])':
foo.java:6: Incompatible type for `='. Explicit cast needed to convert `java.lang.Object[]' to `java.lang.Object[][]'.
vals = v;
^
1 error
I looked at this bug once and came to the conclusion
that gcj thought `v' was of type `Object[]'.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-03-21 11:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-21 11:36 java/2332: valid declaration rejected Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
2001-03-20 14:06 Alexandre Petit-Bianco
2001-03-20 13:46 tromey
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).