-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix compilation warning on aarch64-linux #56480
Conversation
I was kind of hoping this could be related to #54839, but based on local testing that issue still remains after this change. Addressing a compilation warning seems worthwhile anyway though. |
BTW, GCC 14 no longer allows implicitly casting all pointer types to all other pointer types, promoting the above warning to an error (ref: #54310 (comment)), so fixing this issue one way or another is rather important. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember ARMv7 having a similar issue - is it really just AArch64?
The code referred to in the comments in only in aarch64. I don't have direct experience with compiling for armv{6,7}l, so I don't know what are the warnings there. Side note, I just noticed there's a redundant |
This fixes the warning: ``` /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c: In function 'jl_simulate_longjmp': /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c:995:22: warning: initialization of 'mcontext_t *' {aka 'struct sigcontext *'} from incompatible pointer type 'struct unw_sigcontext *' [-Wincompatible-pointer-types] 995 | mcontext_t *mc = &c->uc_mcontext; | ^ ```
34c69bb
to
542ca26
Compare
Ah you're right - I was thinking about this piece: https://github.com/libunwind/libunwind/blob/e63e024b72d35d4404018fde1a546fde976da5c5/include/libunwind-arm.h#L261-L269 Orthogonal to this PR, in any case 🙂 |
With JuliaLang/julia#45729 and JuliaLang/julia#56480 we cleared all the warnings appearing while compiling Julia on this platform, so we can enforce `-Werror` on CI now.
With JuliaLang/julia#45729 and JuliaLang/julia#56480 we cleared all the warnings appearing while compiling Julia on this platform, so we can enforce `-Werror` on CI now.
This fixes the warning: ``` /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c: In function 'jl_simulate_longjmp': /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c:995:22: warning: initialization of 'mcontext_t *' {aka 'struct sigcontext *'} from incompatible pointer type 'struct unw_sigcontext *' [-Wincompatible-pointer-types] 995 | mcontext_t *mc = &c->uc_mcontext; | ^ ``` This is the last remaining warning during compilation on aarch64-linux. (cherry picked from commit 8593792)
This fixes the warning: ``` /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c: In function 'jl_simulate_longjmp': /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c:995:22: warning: initialization of 'mcontext_t *' {aka 'struct sigcontext *'} from incompatible pointer type 'struct unw_sigcontext *' [-Wincompatible-pointer-types] 995 | mcontext_t *mc = &c->uc_mcontext; | ^ ``` This is the last remaining warning during compilation on aarch64-linux. (cherry picked from commit 8593792)
This fixes the warning: ``` /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c: In function 'jl_simulate_longjmp': /cache/build/default-aws-aarch64-ci-1-3/julialang/julia-master/src/stackwalk.c:995:22: warning: initialization of 'mcontext_t *' {aka 'struct sigcontext *'} from incompatible pointer type 'struct unw_sigcontext *' [-Wincompatible-pointer-types] 995 | mcontext_t *mc = &c->uc_mcontext; | ^ ``` This is the last remaining warning during compilation on aarch64-linux. (cherry picked from commit 8593792)
This fixes the warning:
This is the last remaining warning during compilation on aarch64-linux.