aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-15 16:14:54 -0700
committerPaul Eggert2011-03-15 16:14:54 -0700
commit8ef4622dd009b1d720155c7f2063f164f31a511e (patch)
treeb78b0a51a9d7d401e40bf286a5dccea656af6c2d /src
parentb9b84fa9b19f892520aa9fe3479d3da03a9b0da6 (diff)
downloademacs-8ef4622dd009b1d720155c7f2063f164f31a511e.tar.gz
emacs-8ef4622dd009b1d720155c7f2063f164f31a511e.zip
* lisp.h (eassert): Check that the argument compiles, even if
ENABLE_CHECKING is not defined.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/lisp.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 261805a8484..ad96221ed10 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12011-03-15 Paul Eggert <eggert@cs.ucla.edu> 12011-03-15 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * lisp.h (eassert): Check that the argument compiles, even if
4 ENABLE_CHECKING is not defined.
5
3 * data.c (Findirect_variable): Name an expression, to avoid 6 * data.c (Findirect_variable): Name an expression, to avoid
4 gcc -Wbad-function-cast warning. 7 gcc -Wbad-function-cast warning.
5 (default_value, arithcompare, arith_driver, arith_error): Now static. 8 (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;
86/* Define an Emacs version of "assert", since some system ones are 86/* Define an Emacs version of "assert", since some system ones are
87 flaky. */ 87 flaky. */
88#ifndef ENABLE_CHECKING 88#ifndef ENABLE_CHECKING
89#define eassert(X) (void) 0 89#define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */
90#else /* ENABLE_CHECKING */ 90#else /* ENABLE_CHECKING */
91#if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__) 91#if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__)
92#define eassert(cond) CHECK(cond,"assertion failed: " #cond) 92#define eassert(cond) CHECK(cond,"assertion failed: " #cond)