C++,python,热爱算法和机器学习
全部博文(1214)
分类: C/C++
2010-11-30 23:32:19
Specifies that the programmer is aware that a variable or function parameter is not referred to.
function-parameter __attribute__((unused));
variable-declaration __attribute__((unused));
variable-definition __attribute__((unused));
This attribute specifies that the compiler should not issue a warning for an object if the object is not referred to. This attribute specification has no effect if the compiler's unused warning setting is off.
Listing 19.4 Example of the unused attribute
void f(int a __attribute__((unused))) /* No warning for a. */ { int b __attribute__((unused)); /* No warning for b. */ int c; /* Possible warning for c. */ return 20; }