On Fri, 21 Feb 2014, Paul E. McKenney wrote:

> This needs to be as follows:
> 
> [[carries_dependency]] int getzero(int i [[carries_dependency]])
> {
>       return i - i;
> }
> 
> Otherwise dependencies won't get carried through it.

C11 doesn't have attributes at all (and no specification regarding calls 
and dependencies that I can see).  And the way I read the C++11 
specification of carries_dependency is that specifying carries_dependency 
is purely about increasing optimization of the caller: that if it isn't 
specified, then the caller doesn't know what dependencies might be 
carried.  "Note: The carries_dependency attribute does not change the 
meaning of the program, but may result in generation of more efficient 
code. - end note".

-- 
Joseph S. Myers
jos...@codesourcery.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to