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.

Author pablogsal
Recipients Dennis Sweeney, blastwave, lys.nikolaou, pablogsal
Date 2021-07-31.23:02:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627772568.44.0.486172570843.issue44789@roundup.psfhosted.org>
In-reply-to
Content
For example, if I remove -Werror, you will get tons of warnings that will eventually become errors even if the parser code is "fixed":

./Modules/posixmodule.c:13781:18: note: (near initialization for ‘DirEntryType_slots[1].pfunc’)
./Modules/posixmodule.c: In function ‘ScandirIterator_dealloc’:
./Modules/posixmodule.c:14198:26: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
14198 |     freefunc free_func = PyType_GetSlot(tp, Py_tp_free);
      |                          ^~~~~~~~~~~~~~
./Modules/posixmodule.c: At top level:
./Modules/posixmodule.c:14211:21: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
14211 |     {Py_tp_dealloc, ScandirIterator_dealloc},
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
./Modules/posixmodule.c:14211:21: note: (near initialization for ‘ScandirIteratorType_slots[0].pfunc’)
./Modules/posixmodule.c:14212:22: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
14212 |     {Py_tp_finalize, ScandirIterator_finalize},
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
./Modules/posixmodule.c:14212:22: note: (near initialization for ‘ScandirIteratorType_slots[1].pfunc’)
./Modules/posixmodule.c:14213:18: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
14213 |     {Py_tp_iter, PyObject_SelfIter},
      |                  ^~~~~~~~~~~~~~~~~
./Modules/posixmodule.c:14213:18: note: (near initialization for ‘ScandirIteratorType_slots[2].pfunc’)
./Modules/posixmodule.c:14214:22: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
14214 |     {Py_tp_iternext, ScandirIterator_iternext},
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
./Modules/posixmodule.c:14214:22: note: (near initialization for ‘ScandirIteratorType_slots[3].pfunc’)
./Modules/posixmodule.c:15802:19: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
15802 |     {Py_mod_exec, posixmodule_exec},
      |                   ^~~~~~~~~~~~~~~~
./Modules/posixmodule.c:15802:19: note: (near initialization for ‘posixmodile_slots[0].value’)
make: *** [Makefile:2045: Modules/posixmodule.o] Error 1

odules/gcmodule.c:2034:19: note: (near initialization for ‘gcmodule_slots[0].value’)
gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall  -pedantic  -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration
 -fvisibility=hidden  -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE_BUILTIN  -DPy_BUILD_CORE_BUILTIN -I./Include/internal -c ./Modules/posixmodule.c -o Modules/posixmodule.o
In file included from ./Include/Python.h:51,
                 from ./Modules/posixmodule.c:12:
./Modules/posixmodule.c:6838:11: error: array size missing in ‘os_sched_param__doc__’
 6838 | PyDoc_VAR(os_sched_param__doc__);

Python/ceval.c:1223:25: warning: ISO C forbids ‘goto *expr;’ [-Wpedantic]
 1223 | #define DISPATCH_GOTO() goto *opcode_targets[opcode]
      |                         ^~~~
Python/ceval.c:1236:9: note: in expansion of macro ‘DISPATCH_GOTO’
 1236 |         DISPATCH_GOTO(); \
      |         ^~~~~~~~~~~~~
Python/ceval.c:4205:13: note: in expansion of macro ‘DISPATCH’
 4205 |             DISPATCH();
      |             ^~~~~~~~
Python/ceval.c:1223:25: warning: ISO C forbids ‘goto *expr;’ [-Wpedantic]
 1223 | #define DISPATCH_GOTO() goto *opcode_targets[opcode]
      |                         ^~~~
Python/ceval.c:1236:9: note: in expansion of macro ‘DISPATCH_GOTO’
 1236 |         DISPATCH_GOTO(); \
      |         ^~~~~~~~~~~~~
Python/ceval.c:4252:13: note: in expansion of macro ‘DISPATCH’
 4252 |             DISPATCH();
History
Date User Action Args
2021-07-31 23:02:48pablogsalsetrecipients: + pablogsal, blastwave, lys.nikolaou, Dennis Sweeney
2021-07-31 23:02:48pablogsalsetmessageid: <1627772568.44.0.486172570843.issue44789@roundup.psfhosted.org>
2021-07-31 23:02:48pablogsallinkissue44789 messages
2021-07-31 23:02:48pablogsalcreate