fix-gcc14-ffi_arg
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Wed, 10 Apr 2024 11:24:01 +0000 (14:24 +0300)
committerIlias Tsitsimpis <iliastsi@debian.org>
Wed, 10 Apr 2024 11:24:01 +0000 (14:24 +0300)
commit96699b3aad3d4abbe5fa8c0853e3170efb0928fa
tree5efd16f1236a1431db59a2a599a325f40a051a01
parent5eab1f76b0a4967f8c31847918a5036e1a4435fe
fix-gcc14-ffi_arg

commit 1f534c2e7388273e70534680212c1357614c11ed
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Feb 15 15:19:52 2024 +0000

    Fix C output for modern C initiative

    GCC 14 on aarch64 rejects the C code written by GHC with this kind of
    error:

       error: assignment to ‘ffi_arg’ {aka ‘long unsigned int’} from ‘HsPtr’ {aka ‘void *’} makes integer from pointer without a cast [-Wint-conversion]
             68 | *(ffi_arg*)resp = cret;
                |                 ^

    Add the correct cast.

    For more information on this see:
    https://fedoraproject.org/wiki/Changes/PortingToModernC

Tested-by: Richard W.M. Jones <rjones@redhat.com>
Gbp-Pq: Name fix-gcc14-ffi_arg
compiler/GHC/HsToCore/Foreign/Decl.hs