__attribute__ ((format (printf, 2, 3))); 疑惑
来源:互联网 发布:linux cp出某个文件 编辑:程序博客网 时间:2024/06/07 10:42
第一次碰到这种写法,网上搜索了相关解释,做个标记
这句主要作用是提示编译器,对这个函数的调用需要像printf一样,用对应的format字符串来check可变参数的数据类型。例如:extern int my_printf (void *my_object, const char *my_format, ...)__attribute__ ((format (printf, 2, 3)));format (printf, 2, 3)告诉编译器,my_format相当于printf的format,而可变参数是从my_printf的第3个参数开始。这样编译器就会在编译时用和printf一样的check法则来确认可变参数是否正确了
0 0
- __attribute__ ((format (printf, 2, 3))); 疑惑
- __attribute__ ((format (printf, 2, 3)));
- __attribute__((format(printf,x,y)))
- __attribute__((format(printf, a, b)))
- __attribute__ format
- __attribute__ format
- 关于printf的疑惑
- printf output format
- C51 printf format string
- #define DEBUG(format, ...) printf(format, ##__VA_ARGS__)
- CString::Format(), sscanf, printf, scanf
- printf and scanf format codes
- System.out.printf;;String.format
- printf - format and print data
- printf中的format格式 %zd
- 疑惑2
- gcc __attribute__ ((packed)) || __attribute__ ((aligned(4))) 2
- 内核源码中的printk——__attribute__ format
- Linux 多核编程
- node.js基础主要参考阿里巴巴国际站前端技术部推出的文档
- Monitor Oracle Resource Consumption in UNIX (文档 ID 148466.1)
- 解决extjs4.0 grid不能编辑表格问题
- java 理论与实践:正确使用Volatile
- __attribute__ ((format (printf, 2, 3))); 疑惑
- tnsnames.ora 是什么
- Thanks for Andreas and his TexturePacker license
- shiro
- Android 关于字符串的使用String.valueOf(y).substring(0, 5)
- 一个类似Python和Ruby的新型脚本语言(Orange Script)
- Working Backwards to the Technology
- HostGator新推出折扣25%优惠码
- Troubleshooting: High CPU Utilization (文档 ID 164768.1)