From unknown Wed Aug 20 05:17:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18767 <18767@debbugs.gnu.org> To: bug#18767 <18767@debbugs.gnu.org> Subject: Status: 24.4; incorrect byte-compile on arithmatic comparisons Reply-To: bug#18767 <18767@debbugs.gnu.org> Date: Wed, 20 Aug 2025 12:17:49 +0000 retitle 18767 24.4; incorrect byte-compile on arithmatic comparisons reassign 18767 emacs submitter 18767 Shigeru Fukaya severity 18767 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 18 15:59:13 2014 Received: (at submit) by debbugs.gnu.org; 18 Oct 2014 19:59:13 +0000 Received: from localhost ([127.0.0.1]:55310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xfa9g-00040K-K9 for submit@debbugs.gnu.org; Sat, 18 Oct 2014 15:59:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43717) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xfa9e-000406-M8 for submit@debbugs.gnu.org; Sat, 18 Oct 2014 15:59:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xfa9Q-0003SO-8h for submit@debbugs.gnu.org; Sat, 18 Oct 2014 15:59:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xfa9Q-0003SK-5a for submit@debbugs.gnu.org; Sat, 18 Oct 2014 15:58:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xfa9H-0007c9-4J for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 15:58:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xfa98-0003Qu-2n for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 15:58:47 -0400 Received: from mail-pd0-x229.google.com ([2607:f8b0:400e:c02::229]:65481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xfa97-0003Qq-P0 for bug-gnu-emacs@gnu.org; Sat, 18 Oct 2014 15:58:38 -0400 Received: by mail-pd0-f169.google.com with SMTP id w10so2636731pde.28 for ; Sat, 18 Oct 2014 12:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:mime-version:content-type :content-transfer-encoding:message-id; bh=0uiHmGUdO4xE4LXnAMvNNKyqZP2iHIg8jRZ6W9k45jw=; b=pbGuReCBq8yxvO6zVBk3dNx4ZtAPS6NPsnNGgzlvkbxw0HUAu0rhI7+gVYeegWGCEH wk6WQD9DVIKXAu8w40pEdGcf7firaXDRxaFVxbG7IS5j5V6qMyYEtQ/ncoo06Dt9HEtO 2qXSFsnXS15ff+75AWygBGXfhWhFURTFf5fFkGkZxJOWMKBXZpkD5s/8KDuGAjQ2SsJi pjuFZ00H1VO5LG7rj/JpdPepV9gOYWqMPkUIjkfJmg1l1uYv8L+TizmM4QohVkqKcxUQ 5KV4jSFeUL96latz10EjEseAdzQyBs7Ws3ywJ49925oHMeFoRExINxUxPOFDSHsXwCaD 4feg== X-Received: by 10.70.19.101 with SMTP id d5mr16821951pde.79.1413662315101; Sat, 18 Oct 2014 12:58:35 -0700 (PDT) Received: from gmail.com (115x125x38x6.ap115.ftth.ucom.ne.jp. [115.125.38.6]) by mx.google.com with ESMTPSA id hp4sm4776505pbb.95.2014.10.18.12.58.32 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Oct 2014 12:58:34 -0700 (PDT) From: Shigeru Fukaya To: bug-gnu-emacs@gnu.org Subject: 24.4; incorrect byte-compile on arithmatic comparisons Date: Sun, 19 Oct 2014 04:58:31 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: HidemaruMail 6.30 (WinNT,602) Message-Id: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hello, byte-compile of arithmatic comparison operators on more than two arguments is incorrect. (disassemble (lambda () (< (a) (b) (c)))) byte code: args: nil 0 constant a 1 call 0 2 constant b 3 call 0 4 lss 5 goto-if-nil-else-pop 1 8 constant b 9 call 0 10 constant c 11 call 0 12 lss 13:1 return Functions a, b, c should be called once respectively if the function has possibility of side effect. But b may be called twice, and c may not be called. I'm sorry for late report at the very time of release, but I noticed just now. Regards, Shigeru From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 19 06:21:03 2014 Received: (at 18767) by debbugs.gnu.org; 19 Oct 2014 10:21:03 +0000 Received: from localhost ([127.0.0.1]:55431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xfnbi-0000Ze-OQ for submit@debbugs.gnu.org; Sun, 19 Oct 2014 06:21:02 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:38434) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xfnbg-0000Yx-IM for 18767@debbugs.gnu.org; Sun, 19 Oct 2014 06:21:01 -0400 Received: by mail-pd0-f179.google.com with SMTP id r10so3228832pdi.38 for <18767@debbugs.gnu.org>; Sun, 19 Oct 2014 03:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:mime-version:content-type:in-reply-to :references:message-id; bh=lV9lvvJMGx8itguK48NM3jWyjGY3dnEA37T4WulUSu0=; b=P2G9j5hHzUP76qM+uRwQ3M4nnnTX0ocwBt3jcDf83nXxamepVn5qLoxLdpa77LfQQk pV42q8J6mywtDqnpj/tMM3Rte/ldevENFKF8iuvzECP9ZkKXhujLPfy2/S9zJvCWdzfD QHpzQakI8fZon0GC05P/F1TTcHva8IBiso61UAzO8PRUU48PgpWRi1j1PORkOSgYYwuQ JQzK0qm8g7Kq/vzPlOjUbsHKLJH4gaqkki37ITH19SzToEZaSoXGM+4L8cy4HubVfl2W VBBVCMePytZntMAOMlRfmRmeIduYBL+vrSzxUOZfZu1eB7NQ9l3LhRdR8e70Xlh9iDU1 00mQ== X-Received: by 10.69.21.33 with SMTP id hh1mr20508463pbd.42.1413714054340; Sun, 19 Oct 2014 03:20:54 -0700 (PDT) Received: from gmail.com (115x125x38x6.ap115.ftth.ucom.ne.jp. [115.125.38.6]) by mx.google.com with ESMTPSA id nx6sm6275442pab.46.2014.10.19.03.20.51 for <18767@debbugs.gnu.org> (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 19 Oct 2014 03:20:52 -0700 (PDT) From: Shigeru Fukaya To: 18767@debbugs.gnu.org Subject: bug#18767: Acknowledgement (24.4; incorrect byte-compile on arithmatic comparisons) Date: Sun, 19 Oct 2014 19:20:51 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-QLZCFv2momIHbcSknexSB" X-Mailer: HidemaruMail 6.30 (WinNT,602) In-Reply-To: References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> Message-Id: <4DCFEB865BD252shigeru.fukaya@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18767 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Boundary-QLZCFv2momIHbcSknexSB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I tried to fix with the attached patch. Regards, Shigeru --Boundary-QLZCFv2momIHbcSknexSB Content-Type: application/octet-stream; name="bytecomp.diff" Content-Disposition: attachment; filename="bytecomp.diff" Content-Transfer-Encoding: base64 LS0tIGJ5dGVjb21wLmVsLm9yaWcJMjAxNC0wMy0yMSAxNDozNDo0MC4wMDAwMDAwMDAgKzA5 MDAKKysrIGJ5dGVjb21wLmVsCTIwMTQtMTAtMTkgMTk6MTc6MDAuOTE1MTk5NDAwICswOTAw CkBAIC0zMzI5LDE1ICszMzI5LDI0IEBACiAgICAgKGJ5dGUtY29tcGlsZS1mb3JtIChudGgg MiBmb3JtKSkKICAgICAoYnl0ZS1jb21waWxlLW91dCAoZ2V0IChjYXIgZm9ybSkgJ2J5dGUt b3Bjb2RlKSAwKSkpCiAKKyhkZWZ1biBieXRlLWNvbXBpbGUtYWxsLWNvcHlhYmxlLXAgKGxp c3QpCisgICJOb24tbmlsIGlmIGFsbCBlbGVtZW50cyBvZiBMSVNUIHNhdGlzZnkgYG1hY3Jv ZXhwLWNvcHlhYmxlLXAuIgorICAod2hpbGUgKGFuZCBsaXN0IChtYWNyb2V4cC1jb3B5YWJs ZS1wIChjYXIgbGlzdCkpKQorICAgIChzZXRxIGxpc3QgKGNkciBsaXN0KSkpCisgIChudWxs IGxpc3QpKQorCiAoZGVmdW4gYnl0ZS1jb21waWxlLWFuZC1mb2xkZWQgKGZvcm0pCiAgICJD b21waWxlIGNhbGxzIHRvIGZ1bmN0aW9ucyBsaWtlIGA8PScuCi1UaGVzZSBpbXBsaWNpdGx5 IGBhbmQnIHRvZ2V0aGVyIGEgYnVuY2ggb2YgdHdvLWFyZyBieXRlY29kZXMuIgorVGhlc2Ug aW1wbGljaXRseSBgYW5kJyB0b2dldGhlciBhIGJ1bmNoIG9mIHR3by1hcmcgYnl0ZWNvZGVz IHdoZW4KK25vbi1maXJzdCBvcGVyYW5kcyBhcmUgc2lkZS1lZmZlY3QgZnJlZS4iCiAgIChs ZXQgKChsIChsZW5ndGggZm9ybSkpKQogICAgIChjb25kCiAgICAgICgoPCBsIDMpIChieXRl LWNvbXBpbGUtZm9ybSBgKHByb2duICwobnRoIDEgZm9ybSkgdCkpKQogICAgICAoKD0gbCAz KSAoYnl0ZS1jb21waWxlLXR3by1hcmdzIGZvcm0pKQotICAgICAodCAoYnl0ZS1jb21waWxl LWZvcm0gYChhbmQgKCwoY2FyIGZvcm0pICwobnRoIDEgZm9ybSkgLChudGggMiBmb3JtKSkK LQkJCQkgKCwoY2FyIGZvcm0pICxAKG50aGNkciAyIGZvcm0pKSkpKSkpKQorICAgICAoKGJ5 dGUtY29tcGlsZS1hbGwtY29weWFibGUtcCAobnRoY2RyIDIgZm9ybSkpCisgICAgICAoYnl0 ZS1jb21waWxlLWZvcm0gYChhbmQgKCwoY2FyIGZvcm0pICwobnRoIDEgZm9ybSkgLChudGgg MiBmb3JtKSkKKwkJCSAgICAgICAoLChjYXIgZm9ybSkgLEAobnRoY2RyIDIgZm9ybSkpKSkp CisgICAgICh0IChieXRlLWNvbXBpbGUtbm9ybWFsLWNhbGwgZm9ybSkpKSkpCiAKIChkZWZ1 biBieXRlLWNvbXBpbGUtdGhyZWUtYXJncyAoZm9ybSkKICAgKGlmIChub3QgKD0gKGxlbmd0 aCBmb3JtKSA0KSkK --Boundary-QLZCFv2momIHbcSknexSB-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 20 17:43:06 2014 Received: (at 18767) by debbugs.gnu.org; 20 Oct 2014 21:43:06 +0000 Received: from localhost ([127.0.0.1]:57554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgKjJ-0007c3-8F for submit@debbugs.gnu.org; Mon, 20 Oct 2014 17:43:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28889) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgKjG-0007bX-Cj for 18767@debbugs.gnu.org; Mon, 20 Oct 2014 17:43:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAivZ6IyF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAivZ6IyF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94679408" Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Oct 2014 17:42:56 -0400 Received: by pastel.home (Postfix, from userid 20848) id 450DB3EBF; Mon, 20 Oct 2014 17:42:56 -0400 (EDT) From: Stefan Monnier To: Shigeru Fukaya Subject: Re: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons Message-ID: References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> Date: Mon, 20 Oct 2014 17:42:56 -0400 In-Reply-To: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> (Shigeru Fukaya's message of "Sun, 19 Oct 2014 04:58:31 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18767 Cc: 18767@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Version:24.5 > byte-compile of arithmatic comparison operators on more than two > arguments is incorrect. Indeed, I was not very awake when I committed that code. I just reverted the change so the byte-compiler simply doesn't optimize this case. To do any better, I think we'll have to do something like: loop over all args, doing "byte-compile-form" + "dup", and then apply the comparisons backward, combining them with "and". Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 20 17:43:31 2014 Received: (at control) by debbugs.gnu.org; 20 Oct 2014 21:43:31 +0000 Received: from localhost ([127.0.0.1]:57557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgKjj-0007cj-AU for submit@debbugs.gnu.org; Mon, 20 Oct 2014 17:43:31 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28931) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgKjh-0007cX-F9 for control@debbugs.gnu.org; Mon, 20 Oct 2014 17:43:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArQGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEVjMLNBIUGA2IMK9nojIXjwEWhCIEqRmBaoNMIQ X-IPAS-Result: ArQGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEVjMLNBIUGA2IMK9nojIXjwEWhCIEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94679445" Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Oct 2014 17:43:23 -0400 Received: by pastel.home (Postfix, from userid 20848) id C8AB03EBF; Mon, 20 Oct 2014 17:43:23 -0400 (EDT) From: Stefan Monnier To: control@debbugs.gnu.org Subject: Re: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons Message-ID: References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> Date: Mon, 20 Oct 2014 17:43:23 -0400 In-Reply-To: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> (Shigeru Fukaya's message of "Sun, 19 Oct 2014 04:58:31 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) close 18767 thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 05:16:51 2014 Received: (at 18767) by debbugs.gnu.org; 22 Oct 2014 09:16:51 +0000 Received: from localhost ([127.0.0.1]:59137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgs2E-0008JN-Rv for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:16:51 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:59354) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgs2D-0008JB-9h for 18767@debbugs.gnu.org; Wed, 22 Oct 2014 05:16:49 -0400 Received: by mail-pa0-f47.google.com with SMTP id kq14so3294893pab.6 for <18767@debbugs.gnu.org>; Wed, 22 Oct 2014 02:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:mime-version:content-type :content-transfer-encoding:in-reply-to:references:message-id; bh=PbicBSgtZDnSyDhXpnnNG9YV0bQYKPpTdcnQUDk+1SY=; b=vam/HfmUj93EHiGhdj1i3md/HdIz7hxzbyTpDFMbQ1xsVa+jkgHRvyDflOoOsnhmjS ZKj1/fU530a0zgK8hdhNoIOUcHdKKa0RQyp6kQ7sVbxE9ApuG0mbstw6xv9fW2Z6z/DU jgvhsBUt++6vFxdp148QM2lyh4jAhoaKzophRfBeHEBnjAHiNq5qegYl7Jxg1QUNDPix bEt2SH/6+KG3rTRNG42R+65hbdtskQWkUO0vPks6hWq6IiAOoZLT7mMlYna2i16An1uH ETYOyhnb6EgdSD3Gsd++g9F4HiK1MMtl3qK665fiPszQqUgJOHdcwq4kis5cDO/I49hb TXSw== X-Received: by 10.70.35.72 with SMTP id f8mr16965377pdj.134.1413969403176; Wed, 22 Oct 2014 02:16:43 -0700 (PDT) Received: from gmail.com (115x125x38x6.ap115.ftth.ucom.ne.jp. [115.125.38.6]) by mx.google.com with ESMTPSA id cy9sm13907265pdb.28.2014.10.22.02.16.41 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Oct 2014 02:16:42 -0700 (PDT) From: Shigeru Fukaya To: Stefan Monnier Subject: Re: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons Date: Wed, 22 Oct 2014 18:16:42 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: HidemaruMail 6.30 (WinNT,602) In-Reply-To: References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> Message-Id: <50CFEDD8E4FAF2shigeru.fukaya@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18767 Cc: 18767@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I think your change of reversion will cause byte-compile error when more than two args are specified. Maybe you had better call byte-compile-normal-call for that case at least. >loop over all args, doing "byte-compile-form" + "dup", and then apply >the comparisons backward, combining them with "and". Alternative is, If non-first args are all constants or simple reference, fold them with AND, otherwise call them at once by byte-compile-normal-call. Shigeru >Version:24.5 > >> byte-compile of arithmatic comparison operators on more than two >> arguments is incorrect. > >Indeed, I was not very awake when I committed that code. I just >reverted the change so the byte-compiler simply doesn't optimize this case. >To do any better, I think we'll have to do something like: > >loop over all args, doing "byte-compile-form" + "dup", and then apply >the comparisons backward, combining them with "and". > > > Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 09:39:37 2014 Received: (at 18767) by debbugs.gnu.org; 22 Oct 2014 13:39:38 +0000 Received: from localhost ([127.0.0.1]:59274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgw8W-0007uO-Se for submit@debbugs.gnu.org; Wed, 22 Oct 2014 09:39:37 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:56026) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgw8T-0007u5-Nd for 18767@debbugs.gnu.org; Wed, 22 Oct 2014 09:39:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAivZ6IyF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArUGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAivZ6IyF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94826393" Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Oct 2014 09:39:27 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2735D43AB; Wed, 22 Oct 2014 09:39:27 -0400 (EDT) From: Stefan Monnier To: Shigeru Fukaya Subject: Re: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons Message-ID: References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> <50CFEDD8E4FAF2shigeru.fukaya@gmail.com> Date: Wed, 22 Oct 2014 09:39:27 -0400 In-Reply-To: <50CFEDD8E4FAF2shigeru.fukaya@gmail.com> (Shigeru Fukaya's message of "Wed, 22 Oct 2014 18:16:42 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18767 Cc: 18767@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I think your change of reversion will cause byte-compile error when > more than two args are specified. No errors, but yes, warnings. >> loop over all args, doing "byte-compile-form" + "dup", and then apply >> the comparisons backward, combining them with "and". > Alternative is, If non-first args are all constants or simple > reference, fold them with AND, otherwise call them at once by > byte-compile-normal-call. I guess that's OK, indeed. I was worried that (<= 1 0 "a" nil) would return nil rather than signal an error, but I see that this is already the case if you use a normal call. I installed your patch (except, using `cl-every'). Thank you, Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 12:26:31 2014 Received: (at 18767) by debbugs.gnu.org; 22 Oct 2014 16:26:31 +0000 Received: from localhost ([127.0.0.1]:60046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgyk2-0003uv-Mj for submit@debbugs.gnu.org; Wed, 22 Oct 2014 12:26:31 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:46392) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgyk0-0003ui-Tm for 18767@debbugs.gnu.org; Wed, 22 Oct 2014 12:26:29 -0400 Received: by mail-pd0-f171.google.com with SMTP id ft15so3820414pdb.2 for <18767@debbugs.gnu.org>; Wed, 22 Oct 2014 09:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:mime-version:content-type :content-transfer-encoding:in-reply-to:references:message-id; bh=4o6ASHjcmwvX9mrDyyfSf44q+1eFSI8wsiq7PZSjNfQ=; b=x9lp6VGa6XrJMpAiqWqiA0roLVoKJ16hDzl5BL9S4dH7uFtAdkb0SMURSVz/WmheUT q8gZmHslbZw20imIyGnTqhxmYANoRqbDWme7XdBghAglRP22/Z4Zict3AcHhmskh65JI O3o65/BH73msWDVHIxPWHFTxT6nTE6nd3M3MBlLsI6qoE+pR5N3SeD+dv536S17hQXVu 5vNtphyN3rh8Wknty/7DKGakTm0EoDuVYHaiw3FBliv4AdrolmphGieio5m3w1Jycrg/ ETljCjkBsKrhF2qntUmkaop7pXhwlnvaxetz9AUZbrb539XMaU1eKjeV9aD3Lz2B3D2K bM9g== X-Received: by 10.68.108.36 with SMTP id hh4mr22461521pbb.108.1413995182920; Wed, 22 Oct 2014 09:26:22 -0700 (PDT) Received: from gmail.com (115x125x38x6.ap115.ftth.ucom.ne.jp. [115.125.38.6]) by mx.google.com with ESMTPSA id l8sm14593731pbq.25.2014.10.22.09.26.20 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Oct 2014 09:26:21 -0700 (PDT) From: Shigeru Fukaya To: Stefan Monnier Subject: Re: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons Date: Thu, 23 Oct 2014 01:26:22 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: HidemaruMail 6.30 (WinNT,602) In-Reply-To: References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> <50CFEDD8E4FAF2shigeru.fukaya@gmail.com> Message-Id: <51CFEE14EB263Bshigeru.fukaya@gmail.com> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18767 Cc: 18767@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >I was worried that (<= 1 0 "a" nil) would return nil rather than >signal an error, but I see that this is already the case if you use >a normal call. I installed your patch (except, using `cl-every'). How about adding the sentence to their help document, implying the behavior, like, All args are evaluateed (without checking type) at first, then compared left to right. Shigeru From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 13:39:13 2014 Received: (at 18767) by debbugs.gnu.org; 22 Oct 2014 17:39:13 +0000 Received: from localhost ([127.0.0.1]:60157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgzsP-0005py-CB for submit@debbugs.gnu.org; Wed, 22 Oct 2014 13:39:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50411) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgzsN-0005pi-9m for 18767@debbugs.gnu.org; Wed, 22 Oct 2014 13:39:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA0CYEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQIr2eiMheOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNFpY87/2dsb2JhbABZgwaDSsA0CYEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQIr2eiMheOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94849564" Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Oct 2014 13:39:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id E7E6C43C4; Wed, 22 Oct 2014 13:39:04 -0400 (EDT) From: Stefan Monnier To: Shigeru Fukaya Subject: Re: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons Message-ID: References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> <50CFEDD8E4FAF2shigeru.fukaya@gmail.com> <51CFEE14EB263Bshigeru.fukaya@gmail.com> Date: Wed, 22 Oct 2014 13:39:04 -0400 In-Reply-To: <51CFEE14EB263Bshigeru.fukaya@gmail.com> (Shigeru Fukaya's message of "Thu, 23 Oct 2014 01:26:22 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18767 Cc: 18767@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > How about adding the sentence to their help document, implying the > behavior, like, > All args are evaluateed (without checking type) This is necessarily true by virtue of being a function, so I don't think we should repeat it. > at first, > then compared left to right. We could document that some of the later comparisons might be skipped, indeed. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 13:58:25 2014 Received: (at 18767) by debbugs.gnu.org; 22 Oct 2014 17:58:25 +0000 Received: from localhost ([127.0.0.1]:60185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh0Ay-0006N4-WC for submit@debbugs.gnu.org; Wed, 22 Oct 2014 13:58:25 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:44839 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh0Ax-0006Mw-0p for 18767@debbugs.gnu.org; Wed, 22 Oct 2014 13:58:23 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Xh0Aw-0007LK-Ad; Wed, 22 Oct 2014 13:58:22 -0400 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> <50CFEDD8E4FAF2shigeru.fukaya@gmail.com> X-Spook: Cocaine mailbomb bootleg arrangements EuroFed Vickie X-Ran: RIK#a9FS?FI/aQm=Zo*u"H'<"Yc.`f~ojaR_h{$5zPU%=eow7O3>8iR@l.NY})uJ[v*iO\ X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 22 Oct 2014 13:58:22 -0400 In-Reply-To: (Stefan Monnier's message of "Wed, 22 Oct 2014 09:39:27 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 18767 Cc: 18767@debbugs.gnu.org, Shigeru Fukaya X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) Stefan Monnier wrote: > (except, using `cl-every'). This fails to bootstrap: simple.el:2490:32:Error: Symbol's function definition is void: cl-every From unknown Wed Aug 20 05:17:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 20 Nov 2014 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator