Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python 3.12 introduces redundant decls warning #106560

Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-bugAn unexpected behavior, bug, or error
@t-8ch

Description

@t-8ch

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

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp