Declaring Attributes of Functions
来源:互联网 发布:淘宝管制刀具的定义 编辑:程序博客网 时间:2024/05/20 17:24
copy from gcc manual
In GNU C, you declare certain things about functions called in your program which help
the compiler optimize function calls and check your code more carefully.
The keyword __attribute__ allows you to specify special attributes when making a
declaration. This keyword is followed by an attribute specification inside double parentheses.
The following attributes are currently defined for functions on all targets: 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 and warning. Several other attributes are defined for functions on
particular target systems. Other attributes, including section are supported for variables
declarations (see Section 6.36 [Variable Attributes], page 341) and for types (see Section 6.37
[Type Attributes], page 350).
GCC plugins may provide their own attributes.
You may also specify attributes with ‘__’ preceding and following each keyword. This
allows you to use them in header files without being concerned about a possible macro of
the same name. For example, you may use __noreturn__ instead of noreturn.
See Section 6.31 [Attribute Syntax], page 337, for details of the exact syntax for using
attributes.
- Declaring Attributes of Functions
- Declaring Attributes of Functions
- Declaring Attributes of Functions
- Declaring Attributes of Functions
- Specifying Attributes of Types
- Specifying Attributes of Variables
- Specifying Attributes of Variables
- What is the difference between declaring data attributes inside or outside __init__
- A Summary of Unity Attributes
- object is not an instance of declaring class
- object is not an instance of declaring class 反射异常
- object is not an instance of declaring class 反射异常
- 报错:object is not an instance of declaring class
- hibernate 4 object is not an instance of declaring class
- spring的 object is not an instance of declaring class
- object is not an instance of declaring class
- List of C functions
- 4.1 Basics of Functions
- 2011.7.7在MyEclipse 5.5中安装SVN在线安装方法
- Flex笔记之两个mx:List之间拖拽数据。
- Flex 小基础
- SHTML 教程
- 八款开源Android游戏引擎(转)
- Declaring Attributes of Functions
- 常见magento问题三----magento后台无法登陆
- flex动画效果
- ascii码与字符的转换
- VS2010 C++项目配置、宏、环境变量
- 去除MyEclipse频繁弹出的Update Progress窗口
- IOS开发技术之──头文件引用(@class/#import/#include)
- 交叉编译环境搭建
- 配置Apache2.2和PHP5.3