GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GCC warnings on pycore_semaphore.h and Python/parking_lot.c · Issue #110014 · python/cpython

GCC warnings on pycore_semaphore.h and Python/parking_lot.c #110014

New issue
Copy link
New issue
Copy link
Closed
Closed
GCC warnings on pycore_semaphore.h and Python/parking_lot.c#110014
Copy link
Assignees
colesbury

Description

@vstinner
vstinner
opened on Sep 28, 2023
Issue body actions

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

cc @colesbury @ericsnowcurrently

Linked PRs

  • gh-110014: Fix inconsistent struct definition in pycore_semaphore.h #110030
  • gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage #110139
  • gh-110014: Include explicitly <unistd.h> header #110155
  • gh-110014: Fix bootstrap_hash.h: remove debug code #110161
  • gh-110014: Remove PY_TIMEOUT_MAX from limited C API #110217

Activity

  1. colesbury commented on Sep 28, 2023

    @colesbury
    colesbury
    on Sep 28, 2023
    Contributor
    More actions

    Thanks, I'll take a look at this today.

  2. colesbury
    self-assigned this
    on Sep 28, 2023
  3. colesbury commented on Sep 28, 2023

    @colesbury
    colesbury
    on Sep 28, 2023
    Contributor
    More actions

    Example build: https://buildbot.python.org/all/#/builders/361/builds/4112

  4. colesbury
    added a commit that references this issue on Sep 28, 2023

    pythongh-110014: Fix inconsistent struct definition in pycore_semapho…

    6e0228b
  5. vstinner
    added 8 commits that reference this issue on Sep 30, 2023

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage

    111adf3

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage

    8c9a980

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage

    ab89589

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage

    b6eb5cb

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage

    1f9cb25

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage

    801eedc

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage

    d1db176

    gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139)

    74e425e
  6. vstinner
    closed this as completedon Sep 30, 2023
  7. vstinner
    added 9 commits that reference this issue on Sep 30, 2023

    pythongh-110014: Include explicitly <unistd.h> header

    04c5dd1

    pythongh-110014: Include explicitly <unistd.h> header

    85d4c17

    pythongh-110014: Include explicitly <unistd.h> header

    d7b3e46

    gh-110014: Include explicitly <unistd.h> header (#110155)

    7513994

    pythongh-110014: Fix bootstrap_hash.h: remove debug code

    5876d8f

    gh-110014: Fix bootstrap_hash.c: remove debug code (#110161)

    d3728dd

    pythongh-110014: Remove PY_TIMEOUT_MAX from limited C API

    420c75c

    pythongh-110014: Remove PY_TIMEOUT_MAX from limited C API

    f590f2c

    gh-110014: Remove PY_TIMEOUT_MAX from limited C API (#110217)

    4d0d1c3
  8. Glyphack
    added 4 commits that reference this issue on Sep 2, 2024

    pythongh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (pyth…

    28f1396

    pythongh-110014: Include explicitly <unistd.h> header (python#110155)

    e0f276d

    pythongh-110014: Fix bootstrap_hash.c: remove debug code (python#110161)

    4565ba4

    pythongh-110014: Remove PY_TIMEOUT_MAX from limited C API (python#110217

    2ccb1aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @colesbury
    colesbury

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.