digitalmars.D.learn - Static struct assign
- bearophile (11/11) May 28 2009 DMD 1.026 used by Codepad used to give errors on this code:
DMD 1.026 used by Codepad used to give errors on this code:
http://codepad.org/QSE36vhJ
struct S { int x; }
void main() {
S i = 5;
printf("%d", i.x); // prints 0
}
But the current DMD/LDC give no compilation error and just print "0".
Is this a new bug in the front-end?
Bye,
bearophile
May 28 2009








bearophile <bearophileHUGS lycos.com>