P99

◆ P99_UNUSED

#define P99_UNUSED (   ...)    P99_SEP(P00_UNUSED, __VA_ARGS__)

check if the list of expressions is syntactically valid but don't evaluate it

This can be used to mark an identifier as unused to avoid bogus compiler warnings.

bool myTruth(bool t) {
return true;
}
Remarks
this must be in a place where the expression could successfully evaluate and where a declaration of any sort is suitable
this is preferable over the trick (void)EXPR; since it guarantees that EXPR is never evaluated, even if it contains references to volatile objects, and since it can also be placed in file scope.
Examples
test-p99-pow.c.

Definition at line 215 of file p99_enum.h.

P99_UNUSED
#define P99_UNUSED(...)
check if the list of expressions is syntactically valid but don't evaluate it
Definition: p99_enum.h:215