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

Sam Gross report at bugs.python.org
Thu Feb 6 12:09:39 EST 2020


New submission from Sam Gross <colesbury at gmail.com>:

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:

./Include/cpython/object.h:274:3: warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]

This is due to the combination of `-Wall` and `-std=c99`. GCC will only warn if the `-pedantic` option is specified.

----------
components: C API
messages: 361497
nosy: colesbury, vstinner
priority: normal
severity: normal
status: open
title: clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39571>
_______________________________________


More information about the Python-bugs-list mailing list