Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Python 3.12 introduce a-Wredundant-decls warning.
// test.c#include<Python.h>intmain(void) {}
$ gcc test.c -otest$(pkg-config --cflags python-3.12) -Wredundant-declsIn file included from /usr/include/python3.12/Python.h:52, from test.c:1:/usr/include/python3.12/longobject.h:10:26: warning: redundant redeclaration of ‘PyLong_Type’ [-Wredundant-decls] 10| PyAPI_DATA(PyTypeObject) PyLong_Type;| ^~~~~~~~~~~In file included from /usr/include/python3.12/Python.h:44:/usr/include/python3.12/object.h:210:26: note: previous declaration of ‘PyLong_Type’ withtype ‘PyTypeObject’ {aka ‘struct _typeobject’} 210| PyAPI_DATA(PyTypeObject) PyLong_Type;| ^~~~~~~~~~~In file included from /usr/include/python3.12/Python.h:54:/usr/include/python3.12/boolobject.h:10:26: warning: redundant redeclaration of ‘PyBool_Type’ [-Wredundant-decls] 10| PyAPI_DATA(PyTypeObject) PyBool_Type;| ^~~~~~~~~~~/usr/include/python3.12/object.h:211:26: note: previous declaration of ‘PyBool_Type’ withtype ‘PyTypeObject’ {aka ‘struct _typeobject’} 211| PyAPI_DATA(PyTypeObject) PyBool_Type;|
- This was introduced in7559f5f
- This currently breaks the build/tests of util-linux/pylibmount (with -Werror)
Your environment
- CPython versions tested on: 3.12.0b3 (should be the same on master)
- Operating system and architecture: ArchLinux, x86_64