On Mon, 17 Jun 2013, Julian Brown wrote: > IIUC, the incompatibility between the specified > -fstrict-volatile-bitfields behaviour and the C++ memory model is a > recognised deficiency in the ARM EABI. It might be an unpopular > suggestion, but how about disabling the option by default for C++ on > ARM [*]? Maybe even with a "sorry" if the user tries to turn it on > manually?
The C11 and C++11 memory models are the same, this is nothing to do with C++ as opposed to C. Someone from ARM will need to answer as to what their plans are to make AAPCS compatible with the memory model. I'd say strict-volatile-bitfields should only ever apply in cases where it does not conflict with language semantics - so just as "packed" should take precedence, so the memory model should also take precedence (in the absence of --param allow-store-data-races=1, anyway) in those cases where AAPCS would indicate writing to an object outside the maximal sequence of consecutive non-zero-width bit-fields. -- Joseph S. Myers jos...@codesourcery.com