__attribute__((deprecated)) 函数属性

1、此函数属性指示存在某个函数,但如果使用了 deprecated 函数,则编译器必须生成警告。

2、这个函数属性是ARM®编译器支持的GNU编译器扩展。

3、在GNU模式下,这个属性接受一个可选的字符串参数来显示在消息中,即:

__attribute__((deprecated("message")))

4、例程

int Function_Attributes_deprecated_0(int b) __attribute__((deprecated));
发布了124 篇原创文章 · 获赞 21 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/tyustli/article/details/102537384