ned14 / pcpp

A C99 preprocessor written in pure Python
Other
222 stars 41 forks source link

Macro expansion ignores whitespace before line continuation slash #65

Closed thisiscam closed 3 years ago

thisiscam commented 3 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 3 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 3 years ago

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