From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#39385: Erroneous interaction of eval-when-compile and condition-case Date: Sat, 01 Feb 2020 20:04:11 -0500 Message-ID: <87o8uhby0k.fsf@gmail.com> References: <20200201214731.GA11168@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="28061"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 39385@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 02 02:10:25 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iy3mL-0007Cm-Iz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Feb 2020 02:10:25 +0100 Original-Received: from localhost ([::1]:52238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iy3mK-0006Uw-Hh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Feb 2020 20:10:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45757) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iy3h9-0003x9-2l for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 20:05:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iy3h8-0002LB-1n for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 20:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iy3h7-0002L2-UW for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 20:05:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iy3h7-00064J-Pn for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2020 20:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2020 01:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39385 X-GNU-PR-Package: emacs Original-Received: via spool by 39385-submit@debbugs.gnu.org id=B39385.158060546123261 (code B ref 39385); Sun, 02 Feb 2020 01:05:01 +0000 Original-Received: (at 39385) by debbugs.gnu.org; 2 Feb 2020 01:04:21 +0000 Original-Received: from localhost ([127.0.0.1]:39453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy3gT-000637-Jd for submit@debbugs.gnu.org; Sat, 01 Feb 2020 20:04:21 -0500 Original-Received: from mail-qk1-f170.google.com ([209.85.222.170]:38462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy3gR-00062u-4l for 39385@debbugs.gnu.org; Sat, 01 Feb 2020 20:04:19 -0500 Original-Received: by mail-qk1-f170.google.com with SMTP id k6so10674843qki.5 for <39385@debbugs.gnu.org>; Sat, 01 Feb 2020 17:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rqqx7Pjjnb8w9MS5rMrQh02jiQ9VJ50hD/V/TRIGIc8=; b=NTtZGltJsmY3uAXHfsiCXvCtLVsyJsc/VyOqCpQy/WQFGU9XyVDt8GJmCh+hljs2qC qAsb/urzZkk42mUPZ2UB/BHx0l0qYVaTxyjhlyfdN9feS6e5AFZagLW4tW7HG944hJzU Hckt1p/k5Ai0WqkfwlDJ6BOZPEBoP7kWCYaBZszQvQy9/MF0PwAUUIw6hHCkpIYA9Cu8 vriHXYp7vgTkca6KnNdKbXXJLYDOy2PV0FdfRpXnvFgV52VOeqtHo81bdIC7SauvwsRY +pORPHSWgRjkOjfO2/TqxmLix1ISvVNsDIKIeSToiInzGuXs4tR6XCLAmXxrgoU+V4li KRMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rqqx7Pjjnb8w9MS5rMrQh02jiQ9VJ50hD/V/TRIGIc8=; b=bvf2KpfKhE3qi18YT+9QmsAOONN7oYFSK7qQvyxtb4FV38DtBlv0zVpFjRvo/dAdPl rmH1f/tojZOSB7uPA8Og0r7MyeAjjIW0MLknSVhwnEEzW9HnE5wq5RrU304jIO+ERYgk R0rR151m6QWtl4e3dx4e9Oo9rxwbVspB6NVQubkP6sfnHz8p4/FWzJ4JBSLqRniP4+JA e65y7E5sKJj8YvkXN4jd6iHx2Tx1oyZ2ZsLnDp7Ea3rM3M//SJDPWcP61q33lxDwrMwr GSaARGU3Amg6KUA7K2JHop3bGMKJOBv2SjkP4EWfeq9kkyvrgxDV/l9VWkwzmrV4UU3z /FRg== X-Gm-Message-State: APjAAAVhP2MAos6i9LJRemsazabXR/xnMrYIkMi4nz9xY6DTqWlXj8fF prGpRqGcfgEQdiNj+Tj3HiShld6S X-Google-Smtp-Source: APXvYqxpYFSc4Ih4PFh2Gs2IvTxQ5ZXIifLifGjd30o2aPVc6EhCCXWHD6xBJw6vdxKVU3JP/AbWfg== X-Received: by 2002:ae9:c205:: with SMTP id j5mr16963875qkg.58.1580605453331; Sat, 01 Feb 2020 17:04:13 -0800 (PST) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id s48sm7652520qtc.96.2020.02.01.17.04.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Feb 2020 17:04:12 -0800 (PST) In-Reply-To: <20200201214731.GA11168@ACM> (Alan Mackenzie's message of "Sat, 1 Feb 2020 21:47:31 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175575 Archived-At: Alan Mackenzie writes: > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > (defmacro c-safe (&rest body) > ;; safely execute BODY, return nil if an error occurred > `(condition-case nil > (progn ,@body) > (error nil))) > > (defmacro foo () > (error "This message should not be seen")) > > (eval-when-compile > (c-safe (foo))) > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > Now do M-x byte-compile-file bad-eval-when-compile.el . This > erroneously throws the error: > > This message should not be seen The same happens without eval-when-compile. > . This should have been caught by the condition-case generated by > (c-safe ...). I don't think so, because the condition-case is in the code generated by c-safe (because the condition-case is quoted), whereas the error is signaled while generating the code (because the error call is not quoted).