但是大名鼎鼎的GNU(GNU's Not Unix的递归缩写)则不这么认定,它指定 void * 的算法
操作与char * 一致。因此下列语句在GNU编译器中皆正确:
pvoid++; //GNU :正确
pvoid += 1; //GNU :正确
在实际的程序设计中,为符合 ANSI标准,并提高程序的可移植性,我们可以这样编写
实现同样功能的代码:
void * pvoid;
(char *)pvoid++; //ANSI :正确;GNU:正确
(char *)pvoid += 1; //ANSI :错误;GNU:正确
B), if(bTestFlag == TRUE); if(bTestFlag == FLASE);
register:这个关键字请求编译器尽可能的将变量存在CPU 内部寄存器中而不是通过内
存寻址访问以提高效率。
A declaration of an identifier for an object with storage-class specifier register
suggests that access to the object be as fast as possible. The extent to which such
suggestions are effective is implementation-defined.
The implementation may treat anyregister declaration simply as an auto declaration.
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/) | Powered by Discuz! X3.2 |