From: Paul Eggert Date: Thu, 20 Jun 2013 14:47:46 +0000 (-0700) Subject: * alloc.c (die): Move "assertion failed" string here ... X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2016^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5013fc0876296bde339d1cbbdfb19a0cfa1c4079;p=emacs.git * alloc.c (die): Move "assertion failed" string here ... * lisp.h (eassert): ... from here. Also, suppress evaluation of COND when SUPPRESS_CHECKING. This shrinks the executable text size by 0.8% to 2.2% when configured with --enable-checking, depending on optimization flags (GCC 4.8.1 x86-64). --- diff --git a/src/ChangeLog b/src/ChangeLog index c503da29732..82856eb91a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2013-06-20 Paul Eggert + * alloc.c (die): Move "assertion failed" string here ... + * lisp.h (eassert): ... from here. Also, suppress evaluation of + COND when SUPPRESS_CHECKING. This shrinks the executable text + size by 0.8% to 2.2% when configured with --enable-checking, + depending on optimization flags (GCC 4.8.1 x86-64). + * floatfns.c (Flog10): Move to Lisp (marked obsolete there). 2013-06-20 Rüdiger Sonderfeld diff --git a/src/alloc.c b/src/alloc.c index 3eb7e982e0f..d277dd2419b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6515,7 +6515,7 @@ bool suppress_checking; void die (const char *msg, const char *file, int line) { - fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", + fprintf (stderr, "\r\n%s:%d: Emacs fatal error: assertion failed: %s\r\n", file, line, msg); terminate_due_to_signal (SIGABRT, INT_MAX); } diff --git a/src/lisp.h b/src/lisp.h index 3a4819c763e..e2d091e98f1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -130,9 +130,9 @@ extern _Noreturn void die (const char *, const char *, int); extern bool suppress_checking EXTERNALLY_VISIBLE; # define eassert(cond) \ - ((cond) || suppress_checking \ + (suppress_checking || (cond) \ ? (void) 0 \ - : die ("assertion failed: " # cond, __FILE__, __LINE__)) + : die (# cond, __FILE__, __LINE__)) #endif /* ENABLE_CHECKING */ /* Use the configure flag --enable-check-lisp-object-type to make