This is the mail archive of the gcc-prs@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]

java/8473: syntax error on anonymous array subscript


>Number:         8473
>Category:       java
>Synopsis:       syntax error on anonymous array subscript
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 05 23:16:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jesse Rosenstock
>Release:        gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
>Organization:
>Environment:

>Description:
This fails, although it is accepted by javac:

; cat AnonymousArrayAccess.java
class AnonymousArrayAccess {
  void f() {
    Object o = new Object[]{}[0];
  }
}

; gcj AnonymousArrayAccess.java
AnonymousArrayAccess.java:3: ';' expected.
       Object o = new Object[]{}[0];
                                ^
1 error
>How-To-Repeat:
See above.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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