summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Foreign.hs
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2022-11-10 21:03:11 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-23 12:47:11 -0500
commit99aca26b652603bc62953157a48e419f737d352d (patch)
treee50cb238a39bbbd7fe4d9d32b1af8ed290236433 /compiler/GHC/Tc/Gen/Foreign.hs
parentb5c714545abc5f75a1ffdcc39b4bfdc7cd5e64b4 (diff)
downloadhaskell-99aca26b652603bc62953157a48e419f737d352d.tar.gz
CApiFFI: add ConstPtr for encoding const-qualified pointer return types (#22043)
Previously, when using `capi` calling convention in foreign declarations, code generator failed to handle const-cualified pointer return types. This resulted in CC toolchain throwing `-Wincompatible-pointer-types-discards-qualifiers` warning. `Foreign.C.Types.ConstPtr` newtype was introduced to handle these cases - special treatment was put in place to generate appropritetly qualified C wrapper that no longer triggers the above mentioned warning. Fixes #22043
Diffstat (limited to 'compiler/GHC/Tc/Gen/Foreign.hs')
0 files changed, 0 insertions, 0 deletions