On Tue, 7 Feb 2012, Jakub Jelinek wrote: > On Tue, Feb 07, 2012 at 04:01:31PM +0000, Jonathan Wakely wrote: > > > What would it have said for -fabi-version=1 where for > > > we place s.i and s.d into the same byte? > > > > I think it says they shouldn't be in the same byte :-) > > They don't, except for compatibility with the old ABI. > I think easiest would be either to error out on -fabi-version=1 > mixed with an explicit option to request C++11 memory model, > or just ignore it (perhaps with a warning), people who care about the strict > memory model requirements just shouldn't use -fabi-version=1. > Using atomic modifications of the byte that has parts of the tail > padding bits used by another class would be IMHO an overkill.
I agree. The question is of course whether the C++ memory model folks thought about this issue in case there is an ABI that requires this tail-padding reuse (they could have, for example, declared that s.i and s.d are in the same bitfield - that would have made things easy). Richard.