[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Thanks Sam Gross for the hint, it's now fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset f95cd199b4bc16775c8c48641bd85416b17742e7 by Victor Stinner in branch 'master': bpo-39571: Fix clang warning on PyTypeObject typedef (GH-18385) https://github.com/python/cpython/commit/f95cd199b4bc16775c8c48641bd85416b17742e7 --

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
Sam Gross added the comment: Yes, that fixes the warnings for me. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: > Alternatively I think you can just remove the typedef from > Include/cpython/object.h since Include/object.h is always included first. > i.e.: Oh, nice! I proposed PR 18385. Would you mind to confirm that it fix the issue for you? At least, I tested

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18385 ___ Python tracker ___

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
Sam Gross added the comment: Alternatively I think you can just remove the typedef from Include/cpython/object.h since Include/object.h is always included first. i.e.: typedef struct _typeobject { ... } PyTypeObject; to simply struct _typeobject { ... }; --

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I only tested GCC and I forgot that clang is more pedantic on duplicated typedef. I looked better with PyTypeObject, but the fix is easy: just revert my change: PR 18384. -- ___ Python tracker

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
New submission from Sam Gross : A recent commit added a typedef for PyTypeObject in Include/object.h https://github.com/python/cpython/commit/0e4e735d06967145b49fd00693627f3624991dbc This duplicates the typedef in Include/cpython/object.h. Building with clang now issues a warning: