[issue39615] cpython/abstract.h not compatible with C90

Peter Eisentraut report at bugs.python.org
Wed Feb 12 06:55:07 EST 2020


New submission from Peter Eisentraut <peter at eisentraut.org>:

Some inline functions use mixed declarations and code.  These end up visible in third-party code that includes Python.h, which might not be using a C99 compiler.

Example:

In file included from /Users/peter/python-builds/3.9/include/python3.9/abstract.h:843,
                 from /Users/peter/python-builds/3.9/include/python3.9/Python.h:147,
                 from plpython.h:59,
                 from plpy_typeio.h:10,
                 from plpy_cursorobject.h:8,
                 from plpy_cursorobject.c:14:
/Users/peter/python-builds/3.9/include/python3.9/cpython/abstract.h:74:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   74 |     Py_ssize_t offset = tp->tp_vectorcall_offset;
      |     ^~~~~~~~~~

----------
components: Interpreter Core
messages: 361880
nosy: petere
priority: normal
severity: normal
status: open
title: cpython/abstract.h not compatible with C90
versions: Python 3.9

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


More information about the Python-bugs-list mailing list