import std.stdio : writeln;
void main()
{
int a = 7;
int b = 9;
/* some code later */
*(&a + 1) = 2;
writeln(b);
writeln(b);
}
This code prints:
9
2
with latest version of dmd. Is this a bug or am I missing
something? For the record,
gdc prints (as expected):
2
2