From: Markus Date: 2004-08-31T23:11:54+09:00 Subject: Re: (Revised) [PATCH] Subtle bug in bignum.c > >>>>> "G" == Guy Decoux ts > >>>>> "M" == Markus writes: > > > M> That makes sense (and I'd agree with the "really, really subtle > M> assessment). So although my original patch "fixes" the problem, it does > M> so in a way that is not obvious. > > G> Well, it fix the problem for *your* compiler and with *your* level of > G> optimization, probably a more "smart" compiler will be able to optimize > G> it and remove the variable from the register.... Yes, of course...that is why I said "fixes" (in quotes). This usage may be idiomatic, so perhaps I should have been more explicit: > M (paraphrased)> > So although my original patch makes the symptoms go away in the > case I am testing, it does so in a way that sheds no light on > the real problem, which it *hides*. > A patch is *perhaps* to don't give to the compiler the possibility to > optimize these lines (hint "volatile") That was the intent of the patch in the rest of the post to which you responded. Could you perhaps take a look at it and see what you think? I did not do anything with "volatile," in part because I am not really a C programmer, but mostly because (as I explained in the note after the revised patch), I don't trust the idea of leaving things in registers in the hopes that other, unrelated code will find them there. -- MarkusQ