__attribute__

https://www.cnblogs.com/marvin-notes/p/4482805.html

分类

函数属性

aligned
alloc_size
noreturn
returns_twice
noinline, noclone
always_inline
flatten
pure
const
nothrow
sentinel
format
format_arg
no_instrument_function
no_split_stack, section
constructor, destructor
used
unused
deprecated
weak
malloc
alias
ifunc
warn_unused_result
nonnull
gnu_inline
externally_visible
hot
cold
artificial
error
warning

变量属性

aligned
cleanup
common
nocommon
deprecated
mode
packed
section
shared
tls_model
unused
used
vector_size
selectany
weak
dllimport
dllexport

类型属性

aligned
packed
transparent_union unused
deprecated
visibility
and may_alia

我就是大概罗列下,其实有些属性可以修饰不止一种属性类型。不做过多介绍。

Clang 扩展的属性

availability
overloadable



作者:充满活力的早晨
链接:https://www.jianshu.com/p/e2dfccc32c80
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

转载于:https://www.cnblogs.com/xpylovely/p/11137091.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值