Skip to content

Failure when header is included twice with different macros defined #581

@danmar

Description

@danmar

file1.c:

# define Y
# include "test.h"

# define BBB
# include "test.h"

test.h:

#if defined AAA
#elif defined BBB
# undef BBB
#endif

#ifdef BBB
# error adf
#endif

Output:

$ ~/simplecpp/simplecpp file.c
test.h:8: #error: #error adf

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions