Re: [AD] C99 isms in test.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> > ct = 0;
> >
> > do {
> > - z = fixmul(x,y);
> > + z += fixmul(x,y);
> > x += 1317;
> > y += 7143;
> > ct++;
>
> Why are these changes needed? Don't x and y change every iteration?
Yes, but z is never used. A clever compiler will notice this and remove the
`redundant' calculation.
I haven't actually checked if it does this in this case, but I've seen it
doing that in similar cases and I thought it best to err on the side of
caution.
Evert