Volatile MEMs in statement expressions and functions inlined as trees
Richard Henderson
rth@redhat.com
Thu Dec 13 14:38:00 GMT 2001
On Thu, Dec 13, 2001 at 01:54:11PM -0800, Linus Torvalds wrote:
> You misunderstand.
>
> A plain "p = 0;" assignment does _not_ load anything from memory...
Actually I don't misunderstand. GCC _will_ do this iff that statement
appears in an inlined function. That is the bug that was originally
reported. I think aoliva has fixed this now, but I can't remember.
> My argument is a consistency argument, where one of the corner stones is
> exactly the fact that _because_ "p = 0" does not load from memory, then "q
> = p = 0" should _also_ not load.
>
> So I'm asking for _consistency_, nothing more.
I'm still stuck on the existence of a sequence point internal to
operator= (mentioned by Jason earlier), the fact that the expression
is an lvalue, and the fact that reading from p may not yield the 0
that was previously stored.
r~
More information about the Gcc-patches
mailing list