Author Joshua.J.Cogliati
Recipients Joshua.J.Cogliati, Vitor.de.Lima, gustavotemple, jrincayc, lbianc, python-dev, vstinner
Date 2015-03-12.16:27:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426177657.18.0.783247506496.issue23644@psf.upfronthosting.co.za>
In-reply-to
Content
If I change the header to:
#ifndef Py_LIMITED_API
#ifndef Py_ATOMIC_H
#define Py_ATOMIC_H

#include "dynamic_annotations.h"

#include "pyconfig.h"

#ifdef __cplusplus
extern "C" {
#endif

#if defined(HAVE_STD_ATOMIC)
#ifdef __cplusplus
#include <atomic>
using namespace std;
#else
#include <stdatomic.h>
#endif
#endif

... (rest same)

AND use -std=c++11
Then the error changes to:
In file included from /local/python_fix/include/python3.5m/Python.h:53:0,
                 from example_wrap.cxx:154:
/local/python_fix/include/python3.5m/pyatomic.h:42:5: error: ‘_Atomic’ does not name a type
     _Atomic void *_value;
     ^


Basically, <atomic> does define std::atomic_int, but it does not define _Atomic, so the line:
_Atomic void *_value;
will also need to be changed.
History
Date User Action Args
2015-03-12 16:27:37Joshua.J.Cogliatisetrecipients: + Joshua.J.Cogliati, vstinner, jrincayc, python-dev, Vitor.de.Lima, gustavotemple, lbianc
2015-03-12 16:27:37Joshua.J.Cogliatisetmessageid: <1426177657.18.0.783247506496.issue23644@psf.upfronthosting.co.za>
2015-03-12 16:27:37Joshua.J.Cogliatilinkissue23644 messages
2015-03-12 16:27:37Joshua.J.Cogliaticreate