appleseedlab / maki

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

Maki does not correctly identify some properties for macros expandeding to `ParenExpr`s #62

Closed PappasBrent closed 1 month ago

PappasBrent commented 1 month ago

Maki incorrectly identifies some properties as false for macros that expand to parenthesized expressions. For example, for the following code:

#define WRAP(x) (x)
#define ID(x) x

int main(void) {
    int x;
    &WRAP(x);
    &ID(x);
    return 0;
}

Mak reports the IsInvokedWhereAddressableValueRequired property for the invocation of WRAP() as false, when it should be set to true. Maki correctly reports the property for invocation of ID(), however. Maki should correctly report properties for aligned, non-nested macro expansions, regardless of whether or not they are wrapped in a parenthesized expression.