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 process with simplecpp, I obtain: ``` $ simplecpp mytest.c int main ( ) { return 0 ; } mytest.c:1: missing header: Header not found: <stdio.h> ``` The macro SAM_PART_IS_DEFINED() is derived from a third party library from Atmel/Microchip. See [here]([https://github.com/siliconunited/atmel-asf/blob/master/common/utils/parts.h])
Activity
hobala commentedon Aug 7, 2023
Think this is the same error I am experiencing: #300
firewave commentedon Jul 3, 2025