mc-imperial / dredd

Framework for evaluating C/C++ compiler testing tools
Apache License 2.0
11 stars 3 forks source link

Incorrect transformation of braced initialization #225

Closed JamesLee-Jones closed 3 months ago

JamesLee-Jones commented 3 months ago

The expression: char test {24}; is incorrectly translated to:

char test __dredd_replace_expr_char_constant(__dredd_replace_expr_char_constant({__dredd_replace_expr_char_constant(24, 0)}, 5), 10);

The literal in the braces should continue being mutated, but we should avoid mutating expressions if they are being used to initialise a variable.