This is the mail archive of the
mailing list for the GCC project.
Re: [C11-atomic] Miscellaneous fixes 1/n
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Oct 2013 12:40:51 -0400
- Subject: Re: [C11-atomic] Miscellaneous fixes 1/n
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1310172148110 dot 29273 at digraph dot polyomino dot org dot uk>
On 10/17/2013 05:50 PM, Joseph S. Myers wrote:
I've applied this patch to the C11-atomic branch to fix various
Yes, perhaps I should not have checked in the bit that uses the atomic
attribute in the c++ templates... it was working fine until late in the
game when I removed the incorrect "treat atomic as volatile" parts of
the patches.. which then caused that failure. sorry. I didn't know how
to fix it "correctly"... I figured it should be easy if you knew how
:-P but maybe not...
I put a hack in the C++ front end to disable checks on atomic
qualifiers so that libstdc++ builds - I think that if you want other
people to help on a development branch, it should be kept in a state
where it builds and tests cleanly. However, I'm aiming specifically
right. We may re-visit it when we finalize the ABI changes for c++...
Use of the attribute in c++ will ensure that C and C++ both treat an
atomic object the same... My original discussions with lawrence and
jeffrey over atomics concerned the desire to "upsize" an _Atomic object
to the next highest size that supports lock-free operations. (ie, a 6
byte object becomes an 8 byte atomic object). The __attribute__ is
really to ensure we can share the code and get compatible behaviour
between languages. At the moment it is a nop. A better solution may
show up, if we ever actually need it.
to sort out the C front-end (and later stdatomic.h) issues, with a
view to getting the actual C11 support in shape and with adequate
testsuite coverage, so if that's ready on time I may propose it for
mainline without the attribute or C++ changes - as I understand it,
those are only needed for when targets start defining atomic types as
larger or more-aligned than the corresponding non-atomic types, not to
support the C11 features on the most common architectures.
Thanks for picking this up... I for one really appreciate it.