> At this point we need:
>   (1) agreement from C and C++ maintainers on access through volatile
>       lvalue 
>   (2) agreement with the middle-end maintainers not to "optimize"
>       volatile lvalue expressions

We already don't optimize expressions considered to have "volatile"
operands.

It's just our definition of volatile operands did not include this.
The patch i sent is probably overkill in this regard to this specific
semantic.

Anything it sees anything in a statement with volatile, it marks the
statement as volatile, which should stop things from touching it
(anything that *does* optimize something marked volatile is buggy).

I should note that this will probably annoy the people who reported :
        
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3506
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18617
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21580
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20222

(there's a couple others).

Then again, I'm pretty  willing at this point to laugh at people who use
volatile and complain about code quality (even if most of those end up
being caused in the backend)

--Dan

Reply via email to