aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-06-20 07:47:46 -0700
committerPaul Eggert2013-06-20 07:47:46 -0700
commit5013fc0876296bde339d1cbbdfb19a0cfa1c4079 (patch)
tree1c2b476ff4e84f7edf5cb0e6e931a297ad076f12 /src
parent89561f72e587677618afa2fd6962704e841e39e8 (diff)
downloademacs-5013fc0876296bde339d1cbbdfb19a0cfa1c4079.tar.gz
emacs-5013fc0876296bde339d1cbbdfb19a0cfa1c4079.zip
* 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).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/alloc.c2
-rw-r--r--src/lisp.h4
3 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c503da29732..82856eb91a8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
12013-06-20 Paul Eggert <eggert@cs.ucla.edu> 12013-06-20 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * alloc.c (die): Move "assertion failed" string here ...
4 * lisp.h (eassert): ... from here. Also, suppress evaluation of
5 COND when SUPPRESS_CHECKING. This shrinks the executable text
6 size by 0.8% to 2.2% when configured with --enable-checking,
7 depending on optimization flags (GCC 4.8.1 x86-64).
8
3 * floatfns.c (Flog10): Move to Lisp (marked obsolete there). 9 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
4 10
52013-06-20 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de> 112013-06-20 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
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;
6515void 6515void
6516die (const char *msg, const char *file, int line) 6516die (const char *msg, const char *file, int line)
6517{ 6517{
6518 fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", 6518 fprintf (stderr, "\r\n%s:%d: Emacs fatal error: assertion failed: %s\r\n",
6519 file, line, msg); 6519 file, line, msg);
6520 terminate_due_to_signal (SIGABRT, INT_MAX); 6520 terminate_due_to_signal (SIGABRT, INT_MAX);
6521} 6521}
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);
130extern bool suppress_checking EXTERNALLY_VISIBLE; 130extern bool suppress_checking EXTERNALLY_VISIBLE;
131 131
132# define eassert(cond) \ 132# define eassert(cond) \
133 ((cond) || suppress_checking \ 133 (suppress_checking || (cond) \
134 ? (void) 0 \ 134 ? (void) 0 \
135 : die ("assertion failed: " # cond, __FILE__, __LINE__)) 135 : die (# cond, __FILE__, __LINE__))
136#endif /* ENABLE_CHECKING */ 136#endif /* ENABLE_CHECKING */
137 137
138/* Use the configure flag --enable-check-lisp-object-type to make 138/* Use the configure flag --enable-check-lisp-object-type to make