[cfe-dev] Attributes on statements and expressions

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Mon Apr 26 00:40:13 PDT 2010


Sean and me talked about the topic two weeks ago on the list. It is a 
good idea to have attributes as defined in the upcoming C++ standard in 
mind while implementing that feature in clang.

> The clients would typically be static analysis tools such as:
IMHO one thing that will be solved using attributes in the future is a 
"parfor" construct.
> I would like to begin work on a patch that implements this feature in  
> Clang. The first order of business is to decide how the attributes  
> would look in the user source code. One approach is to retain the  
> existing GCC __attribute__ syntax and simply allow the __attribute__  
> token to appear on statements and expressions. 
To be honest I don't like the GCC syntax and - given an proposal already 
accepted for standardization - I wouldn't bother implementing it but go 
straight for the new [[attribute]] syntax.

Best regards
Olaf Krzikalla

More information about the cfe-dev mailing list