On Thu, 17 Oct 2013, DJ Delorie wrote: > > It is as Sandra said, at least on ARM -fstrict-volatile-bitfields > > does not function at all. And the C++11 memory model wins all the time. > > Are we talking about N2429? I read through the changes and it didn't > preclude honoring the user's types.
At least on ARM, you can e.g. have a non-bit-field "char" that occupies part of the same 4-byte unit as an "int" bit-field. And the C11/C++11 memory model prohibits stores to that bit-field from doing read/modify/write on the whole 4-byte unit, as that's a store data race. If the user wants to allow that data race, they can rewrite their code by changing the "char" into a bit-field. I believe that in all cases where strict-volatile-bitfields ABIs are incompatible with the default --param allow-store-data-races=0, the structure can be similarly rewritten by the user so the adjacent fields become bit-fields, if they want the strict-volatile-bitfields requirements for their code to be compatible with the memory model. -- Joseph S. Myers jos...@codesourcery.com