appleseedlab / maki

A tool for analyzing syntactic and semantic properties of C Preprocessor macros in C programs
8 stars 3 forks source link

Maki ignores whitespace in emitted macro definition bodies #25

Closed PappasBrent closed 3 months ago

PappasBrent commented 3 months ago

Currently, when Maki emits the definition for a macro body, it does not preserve the original definition's whitespace. This causes Maki to emit broken definitions for macros whose replacement lists contain type casts, e.g. for the following macro

#define CAST(c) ((unsigned int)(unsigned char)c)

Maki would emit this definition:

((unsignedint)(unsignedchar)c)

Maki should respect the original macro definition's whitespace.