This is the mail archive of the gcc-patches@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: [PATCH] PR c/13134


On Thu, 4 Dec 2003, Richard Henderson wrote:

> > Attributes can now also appear as declspecs.
> 
> Placing the attribute before the type implies that it applies
> to the type.  The only reason this works is that the attribute

Attributes anywhere in the declspecs, or after the declarator (and after
any asm specification immediately following the declarator) apply to the
declaration as a whole.  This is documented.  The syntax with attributes
after the declarator is the one generally used in examples in the
documentation, but somewhat unfortunate given the similar syntax in C++
with a cv-qualifier-seq after a function declarator.  Attributes in nested
declarators apply to the appropriate part of the type.

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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