This is the mail archive of the java-prs@sources.redhat.com mailing list for the Java project.


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

gcj/383: duplicate switch label problems



>Number:         383
>Category:       gcj
>Synopsis:       duplicate switch label problems
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 11 16:00:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     mdejong@cygnus.com
>Release:        unknown-1.0
>Organization:
>Environment:
Linux, Red Hat 6.2
>Description:
The following class compiles, but it should fail
because of a duplicate switch block.

class T1410d1 {
    void foo(int i) {
        switch (i) {
            case 0:
            case 0:
        }
    }
}


One can even get the compiler to core
dump by adding another a case label:


class T1410d1 {
    void foo(int i) {
        switch (i) {
            case 0:
            case 1:
            case 0:
        }
    }
}
>How-To-Repeat:
Compile with "gcj -C T1410d1.java".
>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]