This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: struct __attribute((packed));
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: "'E. Weddington'" <ericw at evcohs dot com>, 'Ralf Corsepius' <ralf dot corsepius at rtems dot org>, 'GCC List' <gcc at gcc dot gnu dot org>, 'Joel Sherrill' <joel dot sherrill at OARcorp dot com>
- Date: Fri, 15 Apr 2005 16:57:01 +0000 (UTC)
- Subject: RE: struct __attribute((packed));
- References: <SERRANO13pL32ctFfj80000018d@SERRANO.CAM.ARTIMI.COM>
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)