Bug 63878
| Summary: | Fails to compile 'union __attribute__((...))' | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Raw Hide | Reporter: | Enrico Scholz <rh-bugzilla> |
| Component: | gcc3 | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| 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-04-29 12:50:41 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 CVS, will be in gcc-3.1-0.26. |
Description of Problem: Trying to compile | struct foo { | union __attribute__ ((packed)) | { | }; | }; fails with | g++3 -c attr.cc | attr.cc:3: `class' tag used in naming `union foo::<anonymous>' Compiling with gcc-2.96, s!union!struct! or placing the '__attribute__((packed))' after the closing brace succeeds. The gcc documentation states in "Type Attributes" | You may also specify attributes between the enum, struct or union | tag and the name of the type rather than after the closing brace. so the code should be correctly. Version-Release number of selected component (if applicable): gcc3-3.1-0.23.1