1 /* $Id: arg_unused.h,v 1.1 2000/01/07 06:33:43 tell Exp $
2 * (C) 1999, Greg J. Badros
9 /* Can mark unused formals as ARG_IGNORE or ARG_UNUSED and avoid warning;
10 uses a gcc feature, but C++ also can do this by just
11 not giving a formal name.
12 ARG_IGNORE is for arguments that really won't be used.
13 whereas ARG_UNUSED just comments that the argument is not used at present
14 and might be worth revisiting to see if we can generalize the code
15 to use it. (Or if alternate implementations might use the variable) */
17 /* do not use the variable name as given-- paste an
18 "_unused" on to the end so we force an error if
20 #define ARG_IGNORE(x) x ## _ignore __attribute__ ((unused))
21 #define ARG_UNUSED(x) x ## _unused __attribute__ ((unused))
22 #elif defined(__cplusplus)
23 #define ARG_IGNORE(x) /* empty */
24 #define ARG_UNUSED(x) /* empty */
26 #define ARG_IGNORE(x) x ## _ignore
27 #define ARG_UNUSED(x) x ## _unused