Alexander Heger added the comment:
When I just comment out the
#include "pyatomic.h"
line, python 3.5.0 will no longer compile
gcc -pthread -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG
-g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement
-I. -IInclude -I./Include -DPy_BUILD_CORE -o Programs/python.o
./Programs/python.c
In file included from Include/traceback.h:8:0,
from Include/Python.h:97,
from ./Programs/python.c:3:
Include/pystate.h:186:8: error: unknown type name ‘_Py_atomic_address’
PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current;
^
Makefile:747: recipe for target 'Programs/python.o' failed
make: *** [Programs/python.o] Error 1
pystate.h:
/* Assuming the current thread holds the GIL, this is the
PyThreadState for the current thread.
Issue #23644: pyatomic.h is incompatible with C++ (yet). Disable
PyThreadState_GET() optimization: declare it as an alias to
PyThreadState_Get(), as done for limited API. */
#if !defined(Py_LIMITED_API) && !defined(__cplusplus)
PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current;
#endif
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25150>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com