* Does wrong_type_argument return or not?
@ 2002-02-22 13:31 Kim F. Storm
2002-02-22 14:45 ` Andreas Schwab
2002-02-23 20:19 ` Richard Stallman
0 siblings, 2 replies; 3+ messages in thread
From: Kim F. Storm @ 2002-02-22 13:31 UTC (permalink / raw)
According to the doc string, Fsignal does not return, so
neither does wrong_type_argument. However, looking at
Fsignal, it can return -- and the code in wrong_type_argument
definitely expects this to happen, so it can itself return
a (valid) value.
And code generally seems to expect wrong_type_argument to
return a valid value for the data which was signalled as
wrong...
However, in many places, the code does not seem to expect
wrong_type_argument to return.
Some examples:
In data.c, Fsubr_arity and Fsubr_interactive_form both call
wrong_type_argument if the arg is not a SUBRP, but then continues
accessing it like that anyway (in case wrong_type_argument does
return).
In fns.c, concat doesn't use the return value from wrong_type_argument
(so why chekc and call it, if the errors it reports cannot happen?).
In syntax.c, check_syntax_table may call wrong_type_argument
in case of an error, but it doesn't return a value. And
looking at the callers of check_syntax_table, I don't think
they expect it to return in case of an error.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Does wrong_type_argument return or not?
2002-02-22 13:31 Does wrong_type_argument return or not? Kim F. Storm
@ 2002-02-22 14:45 ` Andreas Schwab
2002-02-23 20:19 ` Richard Stallman
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2002-02-22 14:45 UTC (permalink / raw)
Cc: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
|> According to the doc string, Fsignal does not return, so
|> neither does wrong_type_argument. However, looking at
|> Fsignal, it can return -- and the code in wrong_type_argument
|> definitely expects this to happen, so it can itself return
|> a (valid) value.
It used to, but that has been disabled. See the comment in Fsignal:
#if 0 /* Most callers are not prepared to handle gc if this returns.
So, since this feature is not very useful, take it out. */
/* If have called debugger and user wants to continue,
just return nil. */
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Does wrong_type_argument return or not?
2002-02-22 13:31 Does wrong_type_argument return or not? Kim F. Storm
2002-02-22 14:45 ` Andreas Schwab
@ 2002-02-23 20:19 ` Richard Stallman
1 sibling, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2002-02-23 20:19 UTC (permalink / raw)
Cc: emacs-devel
According to the doc string, Fsignal does not return, so
neither does wrong_type_argument. However, looking at
Fsignal, it can return -- and the code in wrong_type_argument
definitely expects this to happen, so it can itself return
a (valid) value.
Fsignal can only return in the case of a quit. That code in
wrong_type_argument is obsolete. Nowadays (and for about ten years),
wrong_type_argument cannot return.
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-23 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-22 13:31 Does wrong_type_argument return or not? Kim F. Storm
2002-02-22 14:45 ` Andreas Schwab
2002-02-23 20:19 ` Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).