long problems
Jonathan M Davis
jmdavisProg at gmx.com
Wed Dec 22 21:10:47 PST 2010
On Wednesday 22 December 2010 21:04:37 Ellery Newcomer wrote:
> quick question - will the following code do as I expect?
>
> long x;
>
> x = -1;
>
> assert(x == -1);
>
> cuz I've hit a spot where the optimizer isn't loading the high dword into x
That would depend on what you expect. If you expect x to be equal 42, you're
likely to be dissapointed. ;)
That said, it's definitely a bug if that assertion fails - an _enormous_ bug
really. Regardless, it works just fine on my machine. So, whatever the optimizer
does or doesn't do, the assertion doesn't fail.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list