- 论坛徽章:
- 0
|
zhaohongjian000 发表于 2012-05-28 14:25 ![]()
我猜再怎么跟你强调你都不会明白语言的实现和标准的区别,你要是真看了,有没有发现第一句是“In GNU C ...
`const'
Many functions do not examine any values except their arguments,
and have no effects except the return value. Such a function can
be subject to common subexpression elimination and loop
optimization just as an arithmetic operator would be. These
functions should be declared with the attribute `const'. For
example,
int square (int) __attribute__ ((const));
says that the hypothetical function `square' is safe to call fewer
times than the program says.
The attribute `const' is not implemented in GNU C versions earlier
than 2.5. An alternative way to declare that a function has no
side effects, which works in the current version and in some older
versions, is as follows:
typedef int intfn ();
extern const intfn square;
This approach does not work in GNU C++ from 2.6.0 on, since the
language specifies that the `const' must be attached to the return
value.
我贴这段讲const的出来给你看。
`stdcall'
On the Intel 386, the `stdcall' attribute causes the compiler to
assume that the called function will pop off the stack space used
to pass arguments, unless it takes a variable number of arguments.
再贴一段stdcall的说明来给你看。
要我翻译成汉语吗?
|
|