This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7585: Attributes for nested typedef-name ignored
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- Cc: <gcc-bugs at gcc dot gnu dot org>, <gcc-gnats at gcc dot gnu dot org>
- Date: Thu, 31 Oct 2002 19:16:35 +0000 (GMT)
- Subject: Re: c++/7585: Attributes for nested typedef-name ignored
On Thu, 31 Oct 2002, Wolfgang Bangerth wrote:
> > Said differently, what do you envision for the "right" syntax for
> >
> > typedef unsigned char type[sizeof(int)]
> > __attribute__((__aligned__(__alignof__(int))));
typedef unsigned char
(__attribute__((__aligned__(__alignof__(int)))) type)[sizeof(int)]
(supposing that the attribute is to be applied to the array type).
> I think it would help to have a formal specification of attribute
> placement somewhere. Although it would probably be so complicated that
> nobody would want to read it...
"Attribute Syntax" in the manual. It does presume you fully understand
the formal definition in the C standard of declarator syntax, before you
can understand how it is extended with attributes.
--
Joseph S. Myers
jsm28@cam.ac.uk