void other(int x){} void fn() { int x; other(x), x = 1; } test.c(5): Error: declaration `x` is already defined test.c(4): `variable` `x` is defined here test.c(5): Error: declaration `x` is already defined test.c(4): `variable` `x` is defined here
This is another problem where the root issue is C mixes up semantics with parsing.
@WalterBright created dlang/dmd pull request #14023 "fix Issue 23044 - importC: comma expression with function call parsed…" fixing this issue: - fix Issue 23044 - importC: comma expression with function call parsed as declaration https://github.com/dlang/dmd/pull/14023
dlang/dmd pull request #14023 "fix Issue 23044 - importC: comma expression with function call parsed…" was merged into stable: - 7a63edf2fbc6755ec52e4a61eba60520983096a8 by Walter Bright: fix Issue 23044 - importC: comma expression with function call parsed as declaration https://github.com/dlang/dmd/pull/14023
dlang/dmd pull request #14064 "merge stable" was merged into master: - 20ced85c32e9911663c9c1abd1ced14b95a6c0fd by Walter Bright: fix Issue 23044 - importC: comma expression with function call parsed as declaration (#14023) https://github.com/dlang/dmd/pull/14064