[Bug c++/39219] attribute doesn't work with enums properly
alex dot gcc dot gnu dot org at firetree dot net
gcc-bugzilla@gcc.gnu.org
Wed Jul 22 10:55:00 GMT 2009
------- Comment #10 from alex dot gcc dot gnu dot org at firetree dot net 2009-07-22 10:55 -------
This problem seems to affect all enum attributes that are declared with the
"preferred" syntax. For example, the following enum is not packed, not is a
warning emitted:
enum __attribute__((packed)) Foo {Bar,Baz,Qux};
Here's a quote from the manual:
"""
An attribute specifier list may appear as part of a struct, union or enum
specifier. It may go either immediately after the struct, union or enum
keyword, or after the closing brace. The former syntax is preferred.
"""
(http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Attribute-Syntax.html#Attribute-Syntax)
If the functionality can't be easily fixed, then it would be nice to see a
warning at compile time. At the very least, the manual should be corrected.
--
alex dot gcc dot gnu dot org at firetree dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alex dot gcc dot gnu dot org
| |at firetree dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219
More information about the Gcc-bugs
mailing list