Volatile MEMs in statement expressions and functions inlined as trees
Andreas Schwab
schwab@suse.de
Thu Dec 6 15:33:00 GMT 2001
Linus Torvalds <torvalds@transmeta.com> writes:
|> In article <or4rn9fqka.fsf@free.redhat.lsd.ic.unicamp.br> you write:
|> >
|> >volatile int *p, *q, r;
|> >
|> >void foo() {
|> > *p = *q = r; // don't load *p back
|> >}
|>
|> Does this still load off "q"?
|>
|> I don't think that's what an assignment operator implies.
|>
|> An assignment operator will assign the value to the left side, and have
|> as its value the assigned value. NOT the "re-loaded value".
6.5.15 [#3] ... An assignment expression has the value of the left operand
after the assignment, ...
For me this implies that a volatile object must be reloaded.
Andreas.
--
Andreas Schwab "And now for something
Andreas.Schwab@suse.de completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
More information about the Gcc-patches
mailing list