Re: [PATCH] C undefined behavior fix

jtv (jtv@xs4all.nl)
Tue, 8 Jan 2002 12:41:51 +0100


On Tue, Jan 08, 2002 at 01:27:34AM +0100, J.A. Magallon wrote:
> >
> > int a = 3;
> > {
> > volatile int b = 10;
>
> >>>>>>>>> here b changes

Yes, thank you, that part was obvious already. The question pertained
to the fact that nobody outside compiler-visible code was being handed
an address for b, and so the compiler could (if it wanted to) prove
under pretty broad assumptions that nobody could *find* b to make the
change in the first place.

Now other people assure me that the Standard explicitly rules this out,
and I'm willing to believe that--although naturally I'd still feel more
comfortable if I'd actually seen the relevant text. Just so long as
we're not making another wild-guess stab at solving the problem.

Jeroen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/