I have the following example code:
---
#define WHILE(x) while (x)
int global_var;
int main (void) {
WHILE(global_var);
}
---
After running gc with -stmt_force_brace-1 I get the
following code (I removed the comments that were added
for readability):
---
#define WHILE(x) while(x)
{
int global_var;
}
int main(void)
{
WHILE(global_var);
}
---
It appears as though GC believes the "int global_var;"
line belongs with the "while" statement in the macro
definition. Even without -stmt_force_brace-1 the
indention of "int global_var;" is wrong. This
obviously changes C code and causes it to break.
Example config file, input file and output file