[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's
From: |
Eli Zaretskii |
Subject: |
Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken. |
Date: |
Fri, 19 Apr 2019 13:08:49 +0300 |
> From: Philipp Stephani <address@hidden>
> Date: Fri, 19 Apr 2019 11:52:13 +0200
> Cc: Philipp Stephani <address@hidden>, Emacs developers <address@hidden>
>
> Am Fr., 19. Apr. 2019 um 10:43 Uhr schrieb Eli Zaretskii <address@hidden>:
> >
> > Philipp, I don't understand this change. The function in question
> > should return a Lisp_Object, and AFAIU eassume doesn't do that when
> > ENABLE_CHECKING is not defined. What am I missing?
> >
>
> The default branch can never be taken. We use eassume(false) in many
> other places to document this.
AFAICT, all those places don't need to return anything, which is
unlike here.
When ENABLE_CHECKING is not defined, which happens in every production
build, eassume expands to code that has no side effects, so the
function will return a random value to its caller. I don't think this
is desired. If you want to make sure this branch is never taken even
in a production build, simply call emacs_abort there.
- [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Eli Zaretskii, 2019/04/19
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Philipp Stephani, 2019/04/19
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken.,
Eli Zaretskii <=
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Eli Zaretskii, 2019/04/19
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Paul Eggert, 2019/04/19
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Eli Zaretskii, 2019/04/20
- [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Paul Eggert, 2019/04/22
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Eli Zaretskii, 2019/04/23
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Paul Eggert, 2019/04/23
- Re: [Emacs-diffs] master 74f54af: Use eassume (false) for branch that's never taken., Eli Zaretskii, 2019/04/23