You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GCC warnings on pycore_semaphore.h and Python/parking_lot.c #110014
Building the Python main branch on RHEL8 with gcc -Og -flto (GCC 8.5.0 on ppc64le) emits the following compiler warnings:
./Include/internal/pycore_semaphore.h:54:1: warning: type of ‘_PySemaphore_Wakeup’ does not match original declaration [-Wlto-type-mismatch]
_PySemaphore_Wakeup(_PySemaphore *sema);
^
Python/parking_lot.c:197:1: note: ‘_PySemaphore_Wakeup’ was previously declared here
_PySemaphore_Wakeup(_PySemaphore *sema)
^
Python/parking_lot.c:197:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:57:18: warning: type of ‘_PySemaphore_Init’ does not match original declaration [-Wlto-type-mismatch]
PyAPI_FUNC(void) _PySemaphore_Init(_PySemaphore *sema);
^
Python/parking_lot.c:53:1: note: ‘_PySemaphore_Init’ was previously declared here
_PySemaphore_Init(_PySemaphore *sema)
^
Python/parking_lot.c:53:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:49:1: warning: type of ‘_PySemaphore_Wait’ does not match original declaration [-Wlto-type-mismatch]
_PySemaphore_Wait(_PySemaphore *sema, _PyTime_t timeout_ns, int detach);
^
Python/parking_lot.c:178:1: note: ‘_PySemaphore_Wait’ was previously declared here
_PySemaphore_Wait(_PySemaphore *sema, _PyTime_t timeout, int detach)
^
Python/parking_lot.c:178:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:58:18: warning: type of ‘_PySemaphore_Destroy’ does not match original declaration [-Wlto-type-mismatch]
PyAPI_FUNC(void) _PySemaphore_Destroy(_PySemaphore *sema);
^
Python/parking_lot.c:81:1: note: ‘_PySemaphore_Destroy’ was previously declared here
_PySemaphore_Destroy(_PySemaphore *sema)
^
Python/parking_lot.c:81:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Activity
colesbury commentedon Sep 28, 2023
Thanks, I'll take a look at this today.
colesbury commentedon Sep 28, 2023
Example build: https://buildbot.python.org/all/#/builders/361/builds/4112
pythongh-110014: Fix inconsistent struct definition in pycore_semapho…
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage
gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139)
pythongh-110014: Include explicitly <unistd.h> header
pythongh-110014: Include explicitly <unistd.h> header
pythongh-110014: Include explicitly <unistd.h> header
gh-110014: Include explicitly <unistd.h> header (#110155)
pythongh-110014: Fix bootstrap_hash.h: remove debug code
gh-110014: Fix bootstrap_hash.c: remove debug code (#110161)
pythongh-110014: Remove PY_TIMEOUT_MAX from limited C API
pythongh-110014: Remove PY_TIMEOUT_MAX from limited C API
gh-110014: Remove PY_TIMEOUT_MAX from limited C API (#110217)
pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (pyth…
pythongh-110014: Include explicitly <unistd.h> header (python#110155)
pythongh-110014: Fix bootstrap_hash.c: remove debug code (python#110161)
pythongh-110014: Remove PY_TIMEOUT_MAX from limited C API (python#110217