On 01/04/12 16:31, Artur Skawina wrote:
> Functions attributes seems like it could be an easy, backward compatible 
> addition:
> 
> @attr(attributes...)
> 
> then define some obvious generic attributes like "inline" (which is 
> (always|force)_inline, as it's the only one that makes sense), "noinline", 
> "hot", "cold" etc. This lets you write "@attr(inline) int f(i){}" etc, but 
> doesn't help the vendor specific attr case at all, unfortunately. [2]

User defined attributes. 

"@attr regparm=whatever_the_compiler_uses;", conditioned on version(). 

Would let you do "@attr(regparm) int f(int i){}" in a portable way. Still not 
sure i like it, but could work. Would have to accept and expand to multiple 
attrs though...

artur

Reply via email to