Bug 63878 - Fails to compile 'union __attribute__((...))'
Fails to compile 'union __attribute__((...))'
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc3 (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-19 19:42 EDT by Enrico Scholz
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-29 08:50:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2002-04-19 19:42:23 EDT
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
Comment 1 Jakub Jelinek 2002-04-29 08:50:37 EDT
Fixed in gcc 3.1 CVS, will be in gcc-3.1-0.26.

Note You need to log in before you can comment on or make changes to this bug.