]> git.eshelyaron.com Git - emacs.git/commit
Check instead of relying on NOTREACHED
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 Aug 2019 17:35:08 +0000 (10:35 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 Aug 2019 18:01:46 +0000 (11:01 -0700)
commit7791005544836f93542e8277ad5897f8f5920f05
treeb0c93947951d98f1af820b33094374ddd1658188
parent2de46be6620174e6e2cf4ed397e7cf901d1f1a7a
Check instead of relying on NOTREACHED

NOTREACHED was designed for traditional lint decades ago,
and _Noreturn now normally subsumes its function.
In the one case in Emacs where NORETURN might help and _Noreturn does
not, check for NOTREACHED instead of assuming it.
* lib-src/etags.c (main):
* src/xterm.c (x_connection_closed):
Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED
is no longer needed there.  Also, one of the NOTREACHEDs was
misplaced, which defeated traditional lint checking anyway.
* lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED.
* src/emacs.c (main): Use eassume (false) rather than NOTREACHED,
so that running with ENABLE_CHECKING catches any internal error
causing the toplevel Frecursive_edit to return.
lib-src/etags.c
lib-src/pop.c
src/emacs.c
src/xterm.c