c++/7585: Attributes for nested typedef-name ignored
Joseph S. Myers
jsm28@cam.ac.uk
Thu Oct 31 11:18:00 GMT 2002
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
More information about the Gcc-bugs
mailing list