X-Loop: help-debbugs@HIDDEN Subject: bug#73526: 31.0.50; [FR] warn about unreachable code Resent-From: Eshel Yaron <me@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 28 Sep 2024 10:25:01 +0000 Resent-Message-ID: <handler.73526.B.17275190579563 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 73526 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 73526 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.17275190579563 (code B ref -1); Sat, 28 Sep 2024 10:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Sep 2024 10:24:17 +0000 Received: from localhost ([127.0.0.1]:51912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1suUca-0002UA-VH for submit <at> debbugs.gnu.org; Sat, 28 Sep 2024 06:24:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:45596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1suUcZ-0002U3-Su for submit <at> debbugs.gnu.org; Sat, 28 Sep 2024 06:24:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1suUc5-0003mu-SP for bug-gnu-emacs@HIDDEN; Sat, 28 Sep 2024 06:23:45 -0400 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1suUc4-0006Ez-Eh for bug-gnu-emacs@HIDDEN; Sat, 28 Sep 2024 06:23:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1727519019; bh=qfQzCX/dpsXN8yKHzK4UIsD+nZOv098+f/42Fru9PpA=; h=From:To:Subject:Date:From; b=kfm6W4/GfPtQq0ZIbHT23aD4xTiwQYX4ZC74SDoT5tfEOG2p/LYGAukjAsk3d26dL z1sjiuX/JF+Pw4bbLP7YWABy8+SSO8/gpAAPIfcnAEjdkBBQw5oflJ9X3KxHQfds2A G1Yr/xwC0LD3wwKLYEMesXsri5lT32ITOFXJaN4Jucf0b4E9X5PYQyBoeGme0Gk4JA upjJzFY02HgWPVwt56OTrzjS2ZkD7Kc0vkgKggeFWcSfhZ6+24U6SPt8NlgiuMSKlB OMGVb95bIPC9r753ZwjoM48AnSZ73yDvuR995B6D6uqCJeB1IMW783rZahxUJYVBEt vLQMaY/8yUYdg== From: Eshel Yaron <me@HIDDEN> Date: Sat, 28 Sep 2024 12:23:36 +0200 Message-ID: <m1ploo13h3.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) Feature request: warn about unreachable code in Emacs Lisp. Unreachable code means Lisp forms that occur in positions that can never be reached, so these forms are never evaluated. The simplest cases of unreachable code are code that is only evaluated after some form that never returns (such no-return forms include signal and throw calls, as well as while loops with a never-nil test). Unreachable code often indicates a programmer mistake, and never improves (or otherwise affects) the program's behavior in any way. So it's helpful to warn about it. Clang and Go provide such warnings, for example. Emacs sources include many occurrences of such unreachable code. For example, in lisp/mail/uudecode.el we find: --8<---------------cut here---------------start------------->8--- (cond (done) ((> 0 remain) (error "uucode line ends unexpectedly") (setq done t)) <---- Unreachable! ...) --8<---------------cut here---------------end--------------->8--- In lisp/gnus/nndir.el we see an example of a clear mistake that produces easily detectable unreachable code: --8<---------------cut here---------------start------------->8--- (or err "No such file or directory: %s" nndir-directory) ^ <---- Unreachable! --8<---------------cut here---------------end--------------->8--- Thanks, Eshel
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Eshel Yaron <me@HIDDEN> Subject: bug#73526: Acknowledgement (31.0.50; [FR] warn about unreachable code) Message-ID: <handler.73526.B.17275190579563.ack <at> debbugs.gnu.org> References: <m1ploo13h3.fsf@HIDDEN> X-Gnu-PR-Message: ack 73526 X-Gnu-PR-Package: emacs Reply-To: 73526 <at> debbugs.gnu.org Date: Sat, 28 Sep 2024 10:25:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 73526 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 73526: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D73526 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 3 Nov 2024 06:01:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 03 01:01:06 2024 Received: from localhost ([127.0.0.1]:58160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1t7Tfd-0001E6-Tt for submit <at> debbugs.gnu.org; Sun, 03 Nov 2024 01:01:06 -0500 Received: from mail-ed1-f48.google.com ([209.85.208.48]:59508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1t7Tfc-0001DF-5e for control <at> debbugs.gnu.org; Sun, 03 Nov 2024 01:01:04 -0500 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5c96b2a10e1so4761944a12.2 for <control <at> debbugs.gnu.org>; Sat, 02 Nov 2024 23:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730613598; x=1731218398; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=iHD9q+1dTzf+MqL9DqlKi42WcIWbDaI2B3/Bc8ADC/E=; b=VYrKFrOqtg/Kd7Jezfd+0TS77ALyQBrekTucL2rmsWZ8dKxGE5FPyR8IL2KHusoTaR NY276WnLCBRqOLNRjI2P1AGwJEAANtJDgd/MFzf9FLh7yozn5mSQDZljwCjtm95jiwVs 5lNrsqeEpdA+xA2XNK7JJqDuP36pxDYKBZJPcjwrrKhVQXS8iXA4hUC6npDKuP1oKjX7 H/3cIGK2ltVp68Lt2fLnAy2iH8MYfpq9v8TnnxztNa1ePb138Lz2IdH4guqUkroO8Hqj TOHQ1joGNEliG7TRaRgq0WoJs6sw3U//qXl1r9doWdVX63OzusEkdV8bvl51CumSB03+ +4Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730613598; x=1731218398; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iHD9q+1dTzf+MqL9DqlKi42WcIWbDaI2B3/Bc8ADC/E=; b=wo8hhlMeH/gZKwTf4YBOPCE0OUU10bCr3zMRhyX2F4J4vINvicblabzN1aZd6qDJe3 CvZi3YPKPY8UvgJP3ghnOsv9otMy8OFB2fKaxy07KtIWxz6+JjZhIFFOxcSPydC66p56 Uz0jCp0BnHkM+KmvIb9O6OaTwtXhxXmYMEZHaQuqS9VVFEzO9WWGjapwEy7Q57C6R+uJ IO25MuNEEBj8yax5FU2EozsgeP9422kk6B6nFnc9+9xJzpZbZxgToiFo456CRTs72Y/d B8lvus6JjLEGDRLqxL8PA5jrJWa0LDcRsuJV3zHmzBYA5mE7j/pY5Q9RyiwnR/SmVr2x dxQA== X-Gm-Message-State: AOJu0YzqDgF4BowAhPMH6tTFSukKOYs8C3VBkIabvpnTxEnszvYVgycl f78CIBpcrTOaUM0/wwqKf8jc59bqm2jkBjgISW5MRV+DoaJspVk0a7tFgjhKPOq1Pgy6tnTz0r0 GbMGtOzmQdsWfEyrwMxly7vIvJeLMLA== X-Google-Smtp-Source: AGHT+IHU8RrUAg+UD5hA/hId+U0vZKhCZ1wEznGfNbSFkeD4dZV5ypN9JihBUKR1/oTb5RPLtXsO8iO0DCHv3dPiedU= X-Received: by 2002:a17:907:7e8b:b0:a99:fd32:11dc with SMTP id a640c23a62f3a-a9de5d858aemr2837459366b.24.1730613598380; Sat, 02 Nov 2024 22:59:58 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 2 Nov 2024 22:59:57 -0700 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Sat, 2 Nov 2024 22:59:57 -0700 Message-ID: <CADwFkmmj2d22ueMr7BDie+jLX3Y9VN=ESypT8-75yYMuzJ5Q4g@HIDDEN> Subject: control message for bug #73526 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 73526 wishlist quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.