BoiseState-AdaptLab / IEGenLib

Inspector/Executor Generation Library for manipulating sets and relations with uninterpreted function symbols.
BSD 2-Clause "Simplified" License
2 stars 4 forks source link

Stmt macro definitions do not work properly #162

Open riftEmber opened 2 years ago

riftEmber commented 2 years ago

The second stmt macro definition does not work because of the use of literals in the place of arguments in the macro. For example:

#define s_0(__x0)   bar = foo;
#define s0(0)   s_0(0);

Gives the following error in preprocessing:

test.cpp:2:12: error: expected parameter name, found "0"
    2 | #define s0(0)   s_0(0);
      |            ^

This same thing happens with more complex applied exec schedules like s0(0,i,1). Credit to @AaronStGeorge for finding this

riftEmber commented 2 years ago

@tpops please add to this if there is more relevant information, since you mentioned this gets rid of a benefit of something we were doing