This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Add atomic type qualifier
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 01 Aug 2013 17:54:03 -0400
- Subject: Re: [PATCH] Add atomic type qualifier
- References: <51F2AEB1 dot 60408 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1307262305430 dot 892 at digraph dot polyomino dot org dot uk>
On 07/26/2013 07:21 PM, Joseph S. Myers wrote:
Ive gotten the expressions mostly working (= and op= work great), but
am having some issues with plain loads and identifying the correct time
to emit the load... I've also hacked up a rough approximation of what
stdatomic.h would need.
On Fri, 26 Jul 2013, Andrew MacLeod wrote:
This patch adds an atomic type qualifier to GCC. It can be accessed via
__attribute__((atomic)) or in C11 mode via the _Atomic keyword.
Why the attribute - why not just the keyword?
* When C11 refers to qualified types, by default it does not include
atomic types (6.2.5#27). What's your rationale for including "atomic" in
TYPE_QUALS rather than making it separate? With either approach, a review
of every reference to qualifiers in the front end is needed to determine
what's correct for "atomic"; did you find that including "atomic" in
qualifiers in the implementation made for fewer changes?
I also think I'll revisit how atomic values are marked in the front
end... now that Im doing all the real work in the front end, I don't
think I want that attribute all over the place like I did before. I
may well decide to remove it from the qualifiers and make it a separate
type now... So don't worry about reviewing those files...
I likely wont get to this until I get back from vacation in a couple of
weeks however. I will post the state of things before I go, both for my
own recollection when I return, and in case anyone just happens to feel
really interested and wants to have a look at some of the remaining
required changes. ha. I wish. Its starting to get close tho.