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] Add atomic type qualifier


On 07/26/2013 07:21 PM, Joseph S. Myers wrote:
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?

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.

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.

Andrew


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