nasm/include
H. Peter Anvin (Intel) e47a62ed4d nasmlib.h: modify nasm_assert_pointer() to work with void pointers
nasm_assert_pointer() would fail with newer gcc when passed a void *,
because the construct sizeof(*(p)) is invalid for void pointers, as is
sizeof(&*(p)).

Instead, make use of the fact that the ternary operator ? : requires
type compatibility between the two sides, and const volatile void * is
type-compatible with any pointer.

Since some compilers are known to elide this check when one side is
NULL, make it a explicit pointer to an arbitrary
object cast to (const volatile void *). zero_buffer[] seems a logical
choice.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2026-06-26 16:59:12 -07:00
..
bytesex.h bytesex.h: fix typo in le32toh function name 2025-10-04 15:54:49 -07:00
compiler.h nasmlib: move filename_set_extension() into path.c 2025-12-15 09:58:42 -08:00
dbginfo.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
disp8.h disp8: Fix issue #185 - EVEX compressed shift for MOVDDUP tuple type 2026-01-27 22:24:25 +01:00
error.h error: factor out error functions into separate files 2025-11-07 14:42:33 -08:00
hashtbl.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
iflag.h WIP: more matching and template work 2024-08-20 12:59:07 -07:00
ilog2.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
insns.h struct itemplate: add insns.xda line number to the structure 2026-03-03 09:55:27 -08:00
labels.h labels: make the prefix/suffix options and pragmas consistent 2025-10-07 18:46:39 -07:00
macros.h portability: "const macros_t" is redundant 2025-10-01 13:55:38 -07:00
md5.h Reorganize the source code into subdirectories 2016-05-25 12:06:29 -07:00
nasm.h limits: allow querying limits, and reset limits for each pass 2026-04-09 17:00:49 -07:00
nasmint.h nasmint.h: change header guards to NASM_NASMINT_H 2016-10-04 18:11:57 -07:00
nasmlib.h nasmlib.h: modify nasm_assert_pointer() to work with void pointers 2026-06-26 16:59:12 -07:00
nctype.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
opflags.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
perfhash.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
raa.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
rbtree.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
rdoff.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
saa.h saa: make saa_wleb128[us]() take appropriate types; recode 2026-04-06 16:43:51 -07:00
strlist.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
tables.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00
ver.h treewide: replace verbose copyright headers with SPDX tags 2025-10-01 11:45:31 -07:00