This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18165] New: Attributes following enumeration declaration ignored
- From: "austern at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2004 21:50:35 -0000
- Subject: [Bug c++/18165] New: Attributes following enumeration declaration ignored
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider the following program:
m>
enum X { a = 1 };
enum Y { b = 1 } __attribute__((packed));
int main()
{
using namespace std;
cout << "default: " << sizeof(enum X) << endl;
cout << "with attribute: " << sizeof(enum Y) << endl;
}
The C++ compiler accepts this. However, the attribute on enum Y is ignored. As running this program
shows, the size of enum Y is the same as the size of enum X.
Note that the test suite contains a test to make sure that an attribute in this position is accepted.
(parse/parse3.C) We just failed to make sure that the attribute really did anything.
--
Summary: Attributes following enumeration declaration ignored
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: austern at apple dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin7.5.0
GCC host triplet: powerpc-apple-darwin7.5.0
GCC target triplet: powerpc-apple-darwin7.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18165