Bug 15965
| Summary: | gcc-java does not understand constant in switch | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | mal |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2000-08-13 22:35:27 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: | |||
Should be fixed in http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00516.html Fixed in gcc-java 2.96-53 2.96-53 is OK rpm -q gcc-java gcc-java-2.96-53 [mal@eth0_extrenal tgcc]$ gcj -c Y.java [mal@eth0_extrenal tgcc]$ |
gcc --version 2.96 (RedHat 7.0 Public Beta) gcj Y.java -o x --main=Y Y.java: In class `Y': Y.java: In method `main(java.lang.String[])': Y.java:7: Constant expression required. case x: ^ 1 error cat Y.java public class Y { public static void main(String [] args) { final int x=1; int i=2; switch(i) { case x: System.err.println(x); default: System.err.println("default"); } } }