On Thursday 17 February 2011 21:23:26 Vladimir Panteleev wrote: > On Fri, 18 Feb 2011 07:06:26 +0200, Jason House > > <[email protected]> wrote: > > I would have expected bar to equal 2 since foo would be default > > initialized to 2. I'm going to guess that the there's some kind of > > optimization that only assigns to foo once and isn't noticing that bar > > depends on it. > > Nope: > > int foo; > enum bar = foo+2; > > void main() > { > foo = 7; > assert(bar == 9); > foo++; > assert(bar == 10); > } > > > You should probably post that in bugzilla. > > And complain about basically having expression macros?!
It's a bug. No question. - Jonathan M Davis
