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 3/5] don't restrict bit range for -fstrict-volatile-bitfields


Earlier today I wrote:

On 06/17/2013 08:41 AM, Joseph S. Myers wrote:
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.

The problem with always choosing C++ memory model compliance over ABI
compliance, no matter what the setting of -fstrict-volatile-bitfields,
is that some users may have legacy code out there where they really want
the ABI-compliant behavior.  Perhaps we should not make
-fstrict-volatile-bitfields not be the default on any target any more,
but if you supply it explicitly it tells GCC that you really want the
ABI-compliant behavior to override the language-standard-compliant
behavior?

I had another thought: perhaps -fstrict-volatile-bitfields could remain the default on targets where it currently is, but it can be overridden by an appropriate -std= option. Perhaps also GCC could give an error if -fstrict-volatile-bitfields is given explicitly with an incompatible -std= option.

-Sandra


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