On Thu, 24 Nov 2011, Andrew MacLeod wrote: > On 11/22/2011 04:20 PM, Joseph S. Myers wrote: > > * If TYPE_SIZE_UNIT if the pointer target type is zero. This could be the > > case for empty structures or zero-size arrays (both GNU extensions). > > Logically there's nothing wrong with atomic operations on such a zero-size > > object (they should evaluate all operands for their side effects and then > > need do nothing more). But if you don't want to make them work now, there > > should be a sorry () call and a PR for making them work. > > I talked to Lawrence about this. To be atomic, every object must have a > distinct address, which is violated with zero-size objects. Within the
I don't follow that reasoning - as I said, load/store/exchange of a zero-size object is a no-op and cannot possibly fail to be atomic. But I don't object to this error. > done. > bootstraps on x86_64-unknown-linux-gnu with no new regressions. OK with "non-zero" changed to "nonzero" as per the GCC Coding Conventions. -- Joseph S. Myers jos...@codesourcery.com