This is the mail archive of the gcc-bugs@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: 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


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