Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with ## #269

Open
pozzugno opened this issue Aug 29, 2022 · 1 comment
Open

Problems with ## #269

pozzugno opened this issue Aug 29, 2022 · 1 comment

Comments

@pozzugno
Copy link

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

@hobala
Copy link

hobala commented Aug 7, 2023

Think this is the same error I am experiencing: #300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants