This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: struct __attribute((packed));


On Fri, 15 Apr 2005, Dave Korn wrote:

>   I've often wished that __attribute__s would behave like CV-quals:

The syntax of attributes is documented in the Attribute Syntax section of 
the manual.

http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html

Nested in pointer sequences they do act like cv-quals.  In amongst the 
declaration specifiers on a declaration they act like storage class 
specifiers, but a particular attribute's handler can make them act like 
cv-quals there as well if not constrained by compatibility with how 
previous versions of GCC implemented the attribute.  (See how this is done 
for vector_size attributes.)

The __section__ attribute is purely a storage-class-like attribute.  If 
you want DTR18037 address space specifiers, feel free to implement them; 
they are probably the least problematic part of that TR.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]