ned14 / pcpp

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

Macro expansion ignores whitespace before line continuation slash #65

Closed thisiscam closed 2 years ago

thisiscam commented 2 years ago

Hi,

For the following file test.h:

#define TEST \
1 + 2   \
3 + 4

TEST

With

pcpp test.h

I got:

1 + 23 + 4

While with

clang -E test.h

I got:

1 + 2 3 + 4

I'm not sure what the standard is, but it seems reasonable that if there are spaces before line continuation, they should be preserved?

ned14 commented 2 years ago

Looks like it's been fixed in trunk for some time. I guess now we've given it a year for 1.30 to get settled, time for a release.

ned14 commented 2 years ago

v1.30 is released to https://pypi.org/project/pcpp/