I tested the following source file:
#include <stdio.h> #define __SAMC21N18A__ #define SAM_PART_IS_DEFINED(part) (defined(__ ## part ## __)) #define SAM SAM_PART_IS_DEFINED(SAMC21N18A) int main() { #if SAM printf("Hello World"); #endif return 0; }
gcc compiles it and the application shows "Hello World" as expected. However, when I analyze this file with cppcheck I obtain the following:
cppcheck -E main.c int main ( ) { return 0 ; }
I'm using Cppcheck 2.8 under Windows. The macro SAM_PART_IS_DEFINED() is derived from a third party library from Atmel/Microchip. See here.
could you create a ticket here: https://github.com/danmar/simplecpp/issues
Log in to post a comment.
I tested the following source file:
gcc compiles it and the application shows "Hello World" as expected. However, when I analyze this file with cppcheck I obtain the following:
I'm using Cppcheck 2.8 under Windows. The macro SAM_PART_IS_DEFINED() is derived from a third party library from Atmel/Microchip. See here.
could you create a ticket here:
https://github.com/danmar/simplecpp/issues