Bug 103192
Summary: | gcj: compiler error with valid Java syntax. | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Tony Reix <tony.reix> |
Component: | gcc | Assignee: | Tom Tromey <tromey> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9 | CC: | patrickm |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-08-28 14:42:34 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tony Reix
2003-08-27 16:10:34 UTC
This isn't a bug. Change both instances of "};" to "}" in the switch statement and this code will compile -- those semicolons are invalid. FWIW both jikes and Sun JDK 1.4.2 also reject this code. Thanks for a very easy-to-reproduce bug report. This is the kind I like. This code compiled perfectly well with IBM javac 1.1.8 and IBM javac 1.3.1. I've tried now to compile it with IBM java 1.4.1 : yes that fails ! So it seems to be some uncompatibility between Java 1.4 and previous versions. Thanks for help. Yeah, just FYI, older versions of javac tended to be more lenient with regard to extraneous semicolons. At one point we added code to gcj to let it do this too, but I think we only added cases where we had access to code causing problems for us. In any case, it is a deprecated feature of the compiler (both standard and gcj) -- best to fix the code. |