[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [creduce-dev] Expanding macros?



There is not, because nobody has written it yet.  A patch would be welcome.

Keep in mind that if at all possible you should use CPP to expand macros before running C-Reduce.

John



On 7/19/16 10:42 AM, Ori Brostovski wrote:
Is there a creduce pass that is responsible for expanding macros? If
not, why?

I.e. replacing

// BEGINNING
#include <stdio.h>

#define D(x) x x
#define E(x) x x x

D(E(4))
D(1)
E(2)
// ENDING

with

// BEGINNING
#include <stdio.h>

#define D(x) x x
#define E(x) x x x

4 4 4 4 4 4
1 1
2 2 2
// ENDING