关于c语言中_restrict
来源:互联网 发布:荷塘月色淘宝论坛网址 编辑:程序博客网 时间:2024/05/19 14:00
休息了一个月,今天上班各种不适应。
看到一个函数定义 char *ecvt(double value, int ndigit, int *__restrict decpt, int*__restrict sign);
觉得 那个 __restrict 太怪了
后来查了一下资料
资料:http://msdn.microsoft.com/zh-cn/library/5ft82fed
Like the restrict __declspec modifier, the __restrict keyword indicates that a symbol is not aliased in the current scope. The __restrict keyword differs from the restrict __declspec modifier in the following ways:
The __restrict keyword is valid only on variables, and __declspec(restrict) is only valid on function declarations and definitions.
When __restrict is used, the compiler will not propagate the no-alias property of a variable. That is, if you assign a __restrict variable to a non-__restrict variable, the compiler will not imply that the non-__restrict variable is not aliased. This is different from the behavior of the restrict keyword from the C99 specification.
Generally, if you affect the behavior of an entire function, it is better to use the __declspec than the keyword.
__restrict is similar to restrict from the C99 spec, but __restrict can be used in C++ or C programs.
还是没看懂到底有什么意义。本人初学确实不懂
- 关于c语言中_restrict
- c语言中关于宏
- 关于c语言中printf的几个问题
- C语言中关于IF的问题..
- 关于在TCL中调用C语言
- 关于c语言中static 变量
- 关于C语言中负数的移位
- C语言/C++中关于freopen()
- 关于C语言中32个关键字
- 关于c语言中void*的解释
- 关于c语言中变量赋值问题
- c语言中关于时间的函数
- C语言中关于时间的函数
- [笔记]C语言中关于getch()
- C语言中关于文件的处理
- 关于C语言中+和|的区别
- 关于c语言中register关键字
- 关于c语言中变量赋值问题
- 大数相加
- css实现上传文件,file按钮用图片显示
- asp.net gridview导出Excel、World文档
- 开启177端口
- Git Magic --- Git入门书籍
- 关于c语言中_restrict
- 关于引用类型的成员变量
- MessageBox
- DataSet导出Excel
- Oracle系统中为释放资源kill session的小结
- TCC89X 调试(三)双SD卡盘符固定
- exp,expdp导出数据库出错
- CSDN面向高校俱乐部的广大会员招聘运营专员(客服专员)实习生
- [转帖]PPT 双屏显示