binutils-gdb/sim/d10v
John Baldwin 39549caef4 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.
2021-05-21 17:27:05 -07:00
..
aclocal.m4 sim: enable hardware support by default 2021-04-26 22:30:55 -04:00
ChangeLog sim/d10v: Use offsetof in a static assertion about structure layout. 2021-05-21 17:27:05 -07:00
config.in sim: riscv: move __int128 check to configure 2021-05-16 00:04:17 -04:00
configure sim: riscv: move __int128 check to configure 2021-05-16 00:04:17 -04:00
configure.ac sim: d10v: fix build warnings 2021-04-18 21:16:03 -04:00
d10v_sim.h sim: switch config.h usage to defs.h 2021-05-16 22:38:41 -04:00
endian.c sim: switch config.h usage to defs.h 2021-05-16 22:38:41 -04:00
gencode.c sim: switch config.h usage to defs.h 2021-05-16 22:38:41 -04:00
interp.c sim/d10v: Use offsetof in a static assertion about structure layout. 2021-05-21 17:27:05 -07:00
Makefile.in sim: create header namespace 2021-05-14 00:41:05 -04:00
sim-main.h sim: fully merge sim_state_base into sim_state 2021-05-17 01:05:08 -04:00
simops.c sim: switch config.h usage to defs.h 2021-05-16 22:38:41 -04:00