I\'m finding __attribute__ ((warn_unused_result)) to be very useful as a means of encouraging developers not to ignore error codes returned by functions, but I
__attribute__ ((warn_unused_result))
It's _Check_return_. See here for examples of similar annotations and here for function behaviour. It's supported since MSVC 2012.
_Check_return_
Example:
_Check_return_ int my_return_must_be_checked() { return 42; }