The most recent version of python 2.7 (2.7.13) includes a header unicodeobject.hthat uses a keyword register. I understand that C ++ 17 removed this keyword. When compiling with this header using C ++ 17, many inconveniences are triggered, including:
/opt/anaconda/include/python2.7/unicodeobject.h:534:24: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister]
register PyObject *obj,
^~~
/opt/anaconda/include/python2.7/unicodeobject.h:553:24: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister]
register PyObject *obj
^~~
/opt/anaconda/include/python2.7/unicodeobject.h:575:29: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister]
register const wchar_t *w,
^
/opt/anaconda/include/python2.7/unicodeobject.h:593:23: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister]
register wchar_t *w,
However, I can still compile and run python extensions, despite these warnings. Can I continue to do this? Is there a way (besides explicitly ignoring warnings) to resolve these messages, such as upgrading to another version 2.7 (although, as already mentioned, the newest version still uses the keyword register)?
source
share