This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python.h redundant redeclarations
Type: compile error Stage: patch review
Components: Build Versions: Python 3.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: petri.lehtinen, verticalduck
Priority: normal Keywords: easy, needs review, patch

Created on 2011-07-20 15:16 by verticalduck, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue12595.patch petri.lehtinen, 2011-07-27 18:33
Messages (5)
msg140746 - (view) Author: Tobias Pfaff (verticalduck) Date: 2011-07-20 15:16
Compiling 'Python.h' with g++ and -Wredundant-decls produces warnings

Testcase:

test.cpp:
#include <Python.h>
int main() { return 0; }

g++ test.cpp -I/usr/include/python3.2mu/ -Wredundant-decls
In file included from /usr/include/python3.2mu/Python.h:106,
                 from test.cpp:1:
/usr/include/python3.2mu/pyerrors.h:73: warning: redundant redeclaration of ‘void Py_FatalError(const char*)’ in same scope
/usr/include/python3.2mu/pydebug.h:29: warning: previous declaration of ‘void Py_FatalError(const char*)’
msg141219 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-07-27 11:17
Already fixed in 3.3 as a part of issue 8914. This does not cause a compilation failure with the default build flags, so there's no need to backport to older versions.

Closing as duplicate of issue 8914.
msg141220 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-07-27 11:19
After hitting the submit button, I realized that Python.h is of course included when embedding Python, so the fix could be backported to 3.2.
msg141258 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-07-27 18:33
Attached a partial patch for from issue 8914 that should deal with this issue in 3.2.
msg141309 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-07-28 17:55
Barry Warsaw wrote:
> I don't feel comfortable changing what is defined in
> a header file in a point release, so I am not going
> to backport the fix.

Closing as wont fix.
History
Date User Action Args
2022-04-11 14:57:19adminsetgithub: 56804
2011-07-28 17:55:47petri.lehtinensetstatus: open -> closed
messages: + msg141309

keywords: + needs review
resolution: wont fix
stage: needs patch -> patch review
2011-07-27 18:33:33petri.lehtinensetfiles: + issue12595.patch
keywords: + patch
messages: + msg141258
2011-07-27 11:19:24petri.lehtinensetstatus: closed -> open
superseder: Run clang's static analyzer ->
messages: + msg141220

keywords: + easy
resolution: duplicate -> (no value)
stage: needs patch
2011-07-27 11:17:55petri.lehtinensetstatus: open -> closed

nosy: + petri.lehtinen
messages: + msg141219

superseder: Run clang's static analyzer
resolution: duplicate
2011-07-20 15:16:31verticalduckcreate