[cfe-dev] volatile store/load

Eli Friedman eli.friedman at gmail.com
Sat Jun 7 11:29:08 PDT 2008


On Sat, Jun 7, 2008 at 9:04 AM, C├ędric Venet <cedric.venet at laposte.net> wrote:
>        Hi,
>
> In order to compile this small program (echo.c), I did a very basic
> implementation of volatile. For the moment, I only modified store/load of
> simple scalar value type. Afterward, I saw that there was a fixme in LValue.
> Would it be best to add a volatility flag to LValue, or is my way of doing
> it okay?

Hmm, I'm not completely sure... on the one hand, we are basically
guaranteed to have type information along with any LValue.  On the
other hand, it affects how the load should be constructed, and should
therefore be associated with the LValue along with other properties
which can't be derived from the type, like alignment.  I'm leaning
towards putting volatility into the LValue, but I could be convinced
that the other approach is superior.

-Eli




More information about the cfe-dev mailing list