This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] avoid scheduling volatiles across sequence points



> 
> A sequence point isn't externally visible.  What this paragraph really
> means is that if you make two volatile accesses between sequence
> points:
> 
> volatile int a, b;
> 
> (void)(a++ + b++);
> 
> then it doesn't matter whether the write to 'a' happens before or
> after the write to 'b'.  At present, though, we don't reorder volatile
> accesses at all, correct?

*light comes on* aaah. Got it.

Anyhow, no, we don't reorder the volatile accesses at all. This just had
the intervening instructions moved earlier in execution.

-eric

-- 
I will not carve gods


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]