wy163 - 2026-01-14

Hi,

For example, I have below code in main.c:

#include <stdlib.h>

int main() {
    return 0;
}

With "cppcheck main.c -I /usr/include", there will be error:

error: failed to evaluate #if condition, undefined function-like macro invocation: __GLIBC_USE( ... ) [syntaxError]
#if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)

The checking process will be stopped by this error, and cppcheck exit. Is this normal?
As you know, there also might be -I options in the commands of a compile_commands.json. So checking will not be completed if such a compile_commands.json is imported.
Is there any method to avoid such errors? Thanks!