- 论坛徽章:
- 2
|
Preprocessor
Macros may take a variable number of arguments. In the macro body, the special identifier expands into a list of the variable arguments. A macro argument may consist of no tokens. C99 has a preprocessor operator of the form: _Pragma ( string-literal ) This pragma operator behaves exactly as if a normal #pragma directive was encountered with the value of the string literal as its argument. However, the _Pragma operator may appear anywhere (not just at the beginning of a line) and macro bodies may contain _Pragma. There are additional predefined macro names indicating the version of the C Standard supported, which optional parts of the C Standard are supported, and whether the implementation is hosted or freestanding (whether there is an operating system and C library the program can call). Every function has the following implicit local variable:
static const char __func__[]
= "function-name";
where function-name is the name of the function. (Actually, __func__ does not exist unless referenced in the function.) The assert macro uses __func__ to report the function containing a failing assertion. (This is not a preprocessor feature, but it is similar to __FILE__ and __LINE__.)
Preprocessor arithmetic is performed in the largest signed and unsigned integer types the implementation supports.
arguments:一般是指实参
macro body:宏体
preprocessor operator:通常翻译为“预处理运算”
这不是于处理器的特性 |
|