diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-11-06 21:09:08 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-11-06 21:09:08 -0400 |
commit | 81817dacd6dd6f8204518ad50e0c8b534d6a4366 (patch) | |
tree | f847d7f68ba634a2d66a9ab948f9ae8e8d384855 /binutils | |
parent | a11cd3ddb2af90da3e5af9917a3cf1c749479983 (diff) | |
download | gdb-81817dacd6dd6f8204518ad50e0c8b534d6a4366.zip gdb-81817dacd6dd6f8204518ad50e0c8b534d6a4366.tar.gz gdb-81817dacd6dd6f8204518ad50e0c8b534d6a4366.tar.bz2 |
sim: sh: fix conversion of PC to an integer
On LLP64 targets where sizeof(long) != sizeof(void*), this code fails:
sim/sh/interp.c:704:24: error: cast from pointer to integer of different size -Werror=pointer-to-int-cast]
704 | do { memstalls += ((((long) PC & 3) != 0) ? (n) : ((n) - 1)); } while (0)
| ^
Since this code simply needs to check alignment, cast it using uintptr_t
which is the right type for this.
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions