From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Does wrong_type_argument return or not? Date: 22 Feb 2002 14:31:26 +0100 Message-ID: <5x664p8wy9.fsf@kfs2.cua.dk> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: quimby2.netfonds.no 1014384893 29991 195.204.10.66 (22 Feb 2002 13:34:53 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 22 Feb 2002 13:34:53 GMT Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16eFqf-0007nd-00 for ; Fri, 22 Feb 2002 14:34:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16eFp3-0008WP-00; Fri, 22 Feb 2002 08:33:13 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.33 #1 (Debian)) id 16eFmG-00074o-00 for ; Fri, 22 Feb 2002 08:30:20 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 20B287C035 for ; Fri, 22 Feb 2002 13:30:18 +0000 (GMT) Original-To: emacs-devel@gnu.org Original-Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1412 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1412 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 http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel