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>
Many many developers all over the net respect NASM for what it is:
a widespread (thus netwide), portable (thus netwide!), very flexible
and mature assembler tool with support for many output formats (thus netwide!!).
Now we have good news for you: NASM is licensed under the "simplified"
(2-clause) BSD license.
This means its development is open to even wider society of programmers
wishing to improve their lovely assembler.