ned14 / pcpp

A C99 preprocessor written in pure Python
Other
215 stars 39 forks source link

#include guard containing whitespace is not detected. #96

Open mrolle45 opened 7 months ago

mrolle45 commented 7 months ago

If the source file begins with

# if ! defined X
...
# define X

then this is not considered an include guard. Any whitespace after the ! causes the pattern matching to fail. Similarly with # if !defined (X).

On the other hand, the more common form # ifndef X works fine.

ned14 commented 7 months ago

Thanks for the BR!