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: resurrect __attribute__((atomic)) work


On 05/06/2015 06:41 PM, Sandra Loosemore wrote:
On 05/06/2015 03:22 PM, Andrew MacLeod wrote:

    gcc
    * c-family/c-common.c (const struct attribute_spec c_common_att):
    Add "atomic" attribute.
    (handle_atomic_attribute): New.  Deal with __attribute__((atomic)).
(resolve_overloaded_builtin): If an atomic object is passed by address
    at an __atomic function, cast the atomic-ness away for processing.
    * c-family/c-pretty-print.c (pp_c_cv_qualifiers): Print attribute
    when not ISO c11.

    libstdc++-v3
* include/bits/atomic_base.h (struct __atomic_base): Make template type
    use attribute__((atomic)).
    (template __atomic_base<_PTp*>): Likewise.
    * include/std/atomic (template atomic<_Tp>): Likewise.
    * testsuite/29_atomics/atomic/60695.cc: Adjust error line number.

I see no documentation here....

-Sandra

There is none as yet.. its just a WIP... Over the past year or so I've had a few people inquire into what ever happened to it and/or expressed an interest in finishing it... I extracted it from the old branch and brought it up to a compile-able state. Whether its extended to work just on types, or flushed out to be virtually the same as C11 _Atomic, or eventually abandoned remains to be seen..

All c++ needs is a hook into the type and size of an atomic... maybe it can be tweaked instead to just provide an object with the size and alignment of an atomic object, but not actually be atomic. C++ doesn't actually need an atomic object... That is probably the simplest thing to do...

we can document however  it ends up.

Andrew


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