diff --git a/asm/parser.c b/asm/parser.c index 23183de7e..5fc466792 100644 --- a/asm/parser.c +++ b/asm/parser.c @@ -492,7 +492,7 @@ restart_parse: if (i == TOKEN_EOS) goto fail; - nasm_build_assert(P_none == 0); + nasm_static_assert(P_none == 0); memset(result->prefixes, P_none, sizeof(result->prefixes)); result->times = 1L; diff --git a/include/nasmlib.h b/include/nasmlib.h index 8bd28c0dd..7ab607add 100644 --- a/include/nasmlib.h +++ b/include/nasmlib.h @@ -176,9 +176,9 @@ no_return nasm_assert_failed(const char *, int, const char *); * NASM failure at build time if the argument is false */ #ifdef static_assert -# define nasm_build_assert(x) static_assert(x, #x) +# define nasm_static_assert(x) static_assert(x, #x) #elif defined(HAVE_FUNC_ATTRIBUTE_ERROR) && defined(__OPTIMIZE__) -# define nasm_build_assert(x) \ +# define nasm_static_assert(x) \ if (!(x)) { \ extern void __attribute__((error("assertion " #x " failed"))) \ _nasm_static_fail(void); \ @@ -186,7 +186,7 @@ no_return nasm_assert_failed(const char *, int, const char *); } #else /* See http://www.drdobbs.com/compile-time-assertions/184401873 */ -# define nasm_build_assert(x) \ +# define nasm_static_assert(x) \ do { enum { _static_assert_failed = 1/(!!(x)) }; } while (0) #endif