Skip to content

Warning: incompatible-pointer-types in pycore_pylifecycle.h #110024

Description

@sobolevn

Bug report

In file included from Python/optimizer.c:3:
./Include/internal/pycore_interp.h:222:42: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'const uint64_t *' (aka 'const unsigned long long *') [-Wincompatible-pointer-types]
    return _Py_atomic_load_ulong_relaxed(&interp->_finalizing_id);
                                         ^~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:342:48: note: passing argument to parameter 'obj' here
_Py_atomic_load_uint64_relaxed(const uint64_t *obj)
                                               ^
In file included from Python/optimizer.c:3:
./Include/internal/pycore_interp.h:229:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&interp->_finalizing_id, 0);
                                       ^~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
In file included from Python/optimizer.c:3:
./Include/internal/pycore_interp.h:234:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&interp->_finalizing_id,
                                       ^~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
In file included from Python/optimizer.c:8:
In file included from ./Include/internal/pycore_pystate.h:11:
./Include/internal/pycore_runtime.h:310:42: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'const uint64_t *' (aka 'const unsigned long long *') [-Wincompatible-pointer-types]
    return _Py_atomic_load_ulong_relaxed(&runtime->_finalizing_id);
                                         ^~~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:342:48: note: passing argument to parameter 'obj' here
_Py_atomic_load_uint64_relaxed(const uint64_t *obj)
                                               ^
In file included from Python/optimizer.c:8:
In file included from ./Include/internal/pycore_pystate.h:11:
./Include/internal/pycore_runtime.h:317:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&runtime->_finalizing_id, 0);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
In file included from Python/optimizer.c:8:
In file included from ./Include/internal/pycore_pystate.h:11:
./Include/internal/pycore_runtime.h:322:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&runtime->_finalizing_id,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
6 warnings generated.
gcc -c -fno-strict-overflow -Wsign-compare -g -Og -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include  -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include -I/opt/homebrew/opt/openssl/include -I/opt/homebrew/opt/openssl/include  -DPy_BUILD_CORE \
              -DGITVERSION="\"`LC_ALL=C git --git-dir ./.git rev-parse --short HEAD`\"" \
              -DGITTAG="\"`LC_ALL=C git --git-dir ./.git describe --all --always --dirty`\"" \
              -DGITBRANCH="\"`LC_ALL=C git --git-dir ./.git name-rev --name-only HEAD`\"" \
              -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
In file included from ./Modules/getbuildinfo.c:6:
In file included from ./Include/internal/pycore_pylifecycle.h:11:
In file included from ./Include/internal/pycore_runtime.h:17:
./Include/internal/pycore_interp.h:222:42: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'const uint64_t *' (aka 'const unsigned long long *') [-Wincompatible-pointer-types]
    return _Py_atomic_load_ulong_relaxed(&interp->_finalizing_id);
                                         ^~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:342:48: note: passing argument to parameter 'obj' here
_Py_atomic_load_uint64_relaxed(const uint64_t *obj)
                                               ^
In file included from ./Modules/getbuildinfo.c:6:
In file included from ./Include/internal/pycore_pylifecycle.h:11:
In file included from ./Include/internal/pycore_runtime.h:17:
./Include/internal/pycore_interp.h:229:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&interp->_finalizing_id, 0);
                                       ^~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
In file included from ./Modules/getbuildinfo.c:6:
In file included from ./Include/internal/pycore_pylifecycle.h:11:
In file included from ./Include/internal/pycore_runtime.h:17:
./Include/internal/pycore_interp.h:234:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&interp->_finalizing_id,
                                       ^~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
In file included from ./Modules/getbuildinfo.c:6:
In file included from ./Include/internal/pycore_pylifecycle.h:11:
./Include/internal/pycore_runtime.h:310:42: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'const uint64_t *' (aka 'const unsigned long long *') [-Wincompatible-pointer-types]
    return _Py_atomic_load_ulong_relaxed(&runtime->_finalizing_id);
                                         ^~~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:342:48: note: passing argument to parameter 'obj' here
_Py_atomic_load_uint64_relaxed(const uint64_t *obj)
                                               ^
In file included from ./Modules/getbuildinfo.c:6:
In file included from ./Include/internal/pycore_pylifecycle.h:11:
./Include/internal/pycore_runtime.h:317:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&runtime->_finalizing_id, 0);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
In file included from ./Modules/getbuildinfo.c:6:
In file included from ./Include/internal/pycore_pylifecycle.h:11:
./Include/internal/pycore_runtime.h:322:40: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
        _Py_atomic_store_ulong_relaxed(&runtime->_finalizing_id,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
./Include/cpython/pyatomic_gcc.h:460:43: note: passing argument to parameter 'obj' here
_Py_atomic_store_uint64_relaxed(uint64_t *obj, uint64_t value)
                                          ^
6 warnings generated.

I am working on macos sonoma

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    on Sep 28, 2023
  2. sobolevn commented on Sep 28, 2023

    @sobolevn
    MemberAuthor

    Introduced in #109794 by @ericsnowcurrently

  3. added a commit that references this issue on Sep 29, 2023
  4. ericsnowcurrently commented on Sep 29, 2023

    @ericsnowcurrently
    Member

    Thanks for letting me know about this, @sobolevn.

  5. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions