On Fri, 8 May 2015, Martin Uecker wrote:

> From reading the documentation, it seems that attributes originally
> were supposed to only go with declarations and were not meant to be a
> general extension to the type system. But then there is the example:
> 
> char *__attribute__((aligned(8))) *f;
> 
> which implies that now (some) attributes could work similar to type 
> qualifiers. Is this the idea?

Yes (keeping in mind that many type attributes can only apply to a limited 
subset of types - if the attribute is only meaningful for structures or 
unions, for example, the syntactic binding inside nested declarators is 
fairly irrelevant to it).  Make sure to distinguish the binding of GNU 
attributes (as defined in the manual) and the binding of C++11 attributes 
(as defined in C++11).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to