From 8ef4622dd009b1d720155c7f2063f164f31a511e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:14:54 -0700 Subject: [PATCH] * lisp.h (eassert): Check that the argument compiles, even if ENABLE_CHECKING is not defined. --- src/ChangeLog | 3 +++ src/lisp.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 261805a8484..ad96221ed10 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * lisp.h (eassert): Check that the argument compiles, even if + ENABLE_CHECKING is not defined. + * data.c (Findirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. (default_value, arithcompare, arith_driver, arith_error): Now static. diff --git a/src/lisp.h b/src/lisp.h index 79f3b2f980b..5da73c57c66 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -86,7 +86,7 @@ extern void die (const char *, const char *, int) NO_RETURN; /* Define an Emacs version of "assert", since some system ones are flaky. */ #ifndef ENABLE_CHECKING -#define eassert(X) (void) 0 +#define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */ #else /* ENABLE_CHECKING */ #if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__) #define eassert(cond) CHECK(cond,"assertion failed: " #cond) -- 2.39.2