Bug 58338
| Summary: | gcc-3.1-0.17 can't build 2.4.18-pre3-ac2 because it misparses valid code | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Raw Hide | Reporter: | Jonathan Kamens <jik> |
| Component: | gcc3 | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 1.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: | 2002-01-14 18:27:16 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: | |||
Fixed in gcc-3.1-0.18. |
jik:/tmp!88> cat foo.c typedef struct { int foo; } foo_t; #define CONST_FOO (foo_t) { 0 } foo_t foo[5][5] = { [ 0 ... 4 ] = { [ 0 ... 4 ] = CONST_FOO } }; jik:/tmp!89> gcc -c foo.c foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[0][0]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[0][1]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[0][2]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[0][3]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[0][4]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[0]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[1]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[2]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[3]') foo.c:8: initializer element is not constant foo.c:8: (near initialization for `foo[4]') jik:/tmp!90> If you change the #define to "#define CONST_FOO { 0 }", it compiles. It compiles *without* that change with gcc 2.95.2.