diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-05-21 17:26:24 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2021-05-21 17:27:05 -0700 |
commit | 39549caef4ae5e5adb5a52518d195f367315e9e9 (patch) | |
tree | caa49cda7cb4a7f544a3d4dabb0d53eaf7ab3ed3 /include/elf/tic6x.h | |
parent | 33d93379d258dfb2bebdd67e32e00c9667c486e2 (diff) | |
download | gdb-39549caef4ae5e5adb5a52518d195f367315e9e9.zip gdb-39549caef4ae5e5adb5a52518d195f367315e9e9.tar.gz gdb-39549caef4ae5e5adb5a52518d195f367315e9e9.tar.bz2 |
sim/d10v: Use offsetof in a static assertion about structure layout.
clang 11 fails to compile the static assertion as it cannot compute
the pointer value at a compile time:
gdb/sim/d10v/interp.c:1149:37: error: static_assert expression is not an integral constant expression
static_assert ((uintptr_t) &State == (uintptr_t) &State.regs,
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Instead, assert that the offset of State.regs is 0.
sim/d10v/ChangeLog:
* interp.c (sim_create_inferior): Use offsetof in static
assertion.
Diffstat (limited to 'include/elf/tic6x.h')
0 files changed, 0 insertions, 0 deletions