appleseedlab / maki

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

`IsInvokedWhereICERequired` does not check for invocations in array fields #32

Closed PappasBrent closed 2 months ago

PappasBrent commented 2 months ago

When a macro is invoked to specify the size of an array in a field declaration, Maki fails to report that the macro is invoked where an integral constant expression (ICE) is required.

For example,

#define LEN (3)

typedef struct foo {
    int array[LEN];
} foo;

For the above invocation of LEN, Maki reports IsInvokedWhereICERequired as false, when it should be true.