This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940

            Bug ID: 60940
           Summary: general operations on atomic t ypes do not work with
                    atomic integral typedefs
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org

This is rejected because the atomic operations only accept std::atomic<T> not
the std::__atomic_base<T> base classes:

#ifdef __cplusplus
#include <atomic>
using namespace std;
#else
#include <stdatomic.h>
#endif

atomic_int i;

int main()
{
  atomic_store(&i, 0);
  return atomic_load(&i);
}


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