[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/28630] [mingw] bfd/coffgen.c triggers "cast to pointer fro
From: |
pexu at sourceware dot mail.kapsi.fi |
Subject: |
[Bug binutils/28630] [mingw] bfd/coffgen.c triggers "cast to pointer from integer of different size" [-Werror=int-to-pointer-cast] |
Date: |
Mon, 29 Nov 2021 11:49:56 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28630
--- Comment #2 from Pekka Seppänen <pexu at sourceware dot mail.kapsi.fi> ---
In this case for x86_64-w64-mingw32-gcc __SIZEOF_POINTER__ is 8 while
__SIZEOF_LONG__ is only 4. Since all store locations use an explicit cast this
goes undetected.
E.g. struct internal_syment uses bfd_hostptr_t (instead of long) for _n_offset
which appears to also hold either a pointer or an index.
So, maybe a better alternative would be to change x_offset (and x_zeroes) from
long to bfd_hostptr_t, too, but I do not know how much havoc this creates for
code that might expect x_offset being long.
--
You are receiving this mail because:
You are on the CC list for the bug.