Quick Links: |
Provide a macro to prevent elision of unused entities. More...
BSLA_USED | emit annotated entity even if not referenced |
BSLA_USED_IS_ACTIVE | 0 if BSLA_USED expands to nothing and 1 otherwise |
BSLA_USED
: BSLA_USED_IS_ACTIVE
: BSLA_USED_IS_ACTIVE
is defined to 0 if BSLA_USED
expands to nothing and 1 otherwise.BSLA_UNUSED
and the other marked BSLA_USED
: static int usage_UNUSED_variable_no_warning BSLA_UNUSED; static int usage_USED_variable_no_warning BSLA_USED;
main
, which is in the same file and from which both variables are visible, we observe that the variable marked BSLA_UNUSED
cannot be accessed, but the variable marked BSLA_USED
can. BSLA_UNUSED
and one marked BSLA_USED
: static void usage_UNUSED_function_no_warning(int woof) BSLA_UNUSED; // Print the specified 'woof'. static void usage_UNUSED_function_no_warning(int woof) { printf("%d\n", woof); } static void usage_USED_function_no_warning(int woof) BSLA_USED; // Print the specified 'woof'. static void usage_USED_function_no_warning(int woof) { printf("%d\n", woof); }
BSLA_USED
, but not in the function marked BSLA_UNUSED
.