From: Paul Eggert Date: Tue, 15 Mar 2011 23:14:54 +0000 (-0700) Subject: * lisp.h (eassert): Check that the argument compiles, even if X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~47 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8ef4622dd009b1d720155c7f2063f164f31a511e;p=emacs.git * lisp.h (eassert): Check that the argument compiles, even if ENABLE_CHECKING is not defined. --- 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)