Common macros and compiler attributes/pragmas configuration. More...
Common macros and compiler attributes/pragmas configuration.
Definition in file modules.h.
|Allows to verify a macro definition outside the preprocessor. More...|
|Checks whether a module is being used or not. More...|
Allows to verify a macro definition outside the preprocessor.
This macro is based on Linux's clever 'IS_BUILTIN' (https://github.com/torvalds/linux/blob/master/include/linux/kconfig.h). It takes a
macro value that may be defined to 1 or not even defined (e.g. FEATURE_FOO) and then expands it to an expression that can be used in C code, either 1 or 0.
The advantage of using this is that the compiler sees all the code, so checks can be performed, sections that would not be executed are removed during optimization. For example:
|[in]||macro||Macro to evaluate|