[Issue 1685] Array index is evaluated twice
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 1 10:40:07 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1685
------- Comment #2 from i.kasiuk at gmx.de 2008-03-01 12:40 -------
The bug is still present in version 2.011.
It's especially dangerous with float arrays, e.g.
f[i++] += 0.1;
will result in i being incremented by 2 (and the wrong element of f[] being
incremented by 0.1).
--
More information about the Digitalmars-d-bugs
mailing list