Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sobolevn opened this issue Sep 28, 2023 · 2 comments
Closed

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

sobolevn opened this issue Sep 28, 2023 · 2 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Sep 28, 2023

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

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Sep 28, 2023
@sobolevn
Copy link
Member Author

Introduced in #109794 by @ericsnowcurrently

@ericsnowcurrently ericsnowcurrently self-assigned this Sep 28, 2023
ericsnowcurrently added a commit that referenced this issue Sep 29, 2023
@ericsnowcurrently
Copy link
Member

Thanks for letting me know about this, @sobolevn.

Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants