Closed
Description
Bug report
Link: https://github.com/python/cpython/actions/runs/11333284963/job/31517440086#step:6:1315
Report:
./Programs/_testembed.c:1904:5: warning: code will never be executed [-Wunreachable-code]
const char *err_msg;
^~~~~~~~~~~~~~~~~~~~
sed -e "s,/usr/bin/env python3,/usr/local/bin/python3.14," < ./Tools/scripts/pydoc3 > build/scripts-3.14/pydoc3.14
./Programs/_testembed.c:2052:5: warning: code will never be executed [-Wunreachable-code]
const char *err_msg;
sed -e "s,@EXENAME@,/usr/local/bin/python3.14," < ./Misc/python-config.in >python-config.py
^~~~~~~~~~~~~~~~~~~~
Source of problem:
- We cannot have
goto
targets on variable declarations. - So, they are declared right above:
Lines 1903 to 1910 in cc5a225
- So, this warning marks
const char *err_msg;
as unreachable code
I propose to declare this variable before the first goto
. This way we can remove this warning. And since this is just a test, we can do that freely.