From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [50.116.15.146]) by inbox.vuxu.org (Postfix) with ESMTP id 84D0D2FA4B for ; Sat, 16 Aug 2025 00:00:02 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 9419943BFF; Sat, 16 Aug 2025 07:59:56 +1000 (AEST) Received: from aneurin.horsfall.org (static-n49-176-133-24.sbr4.nsw.optusnet.com.au [49.176.133.24]) by minnie.tuhs.org (Postfix) with ESMTP id 20F9043BF1 for ; Sat, 16 Aug 2025 07:59:48 +1000 (AEST) Received: from aneurin.horsfall.org (localhost [127.0.0.1]) by aneurin.horsfall.org (8.14.9/8.14.9) with ESMTP id 57FLxlW2067198 for ; Sat, 16 Aug 2025 07:59:47 +1000 (EST) (envelope-from dave@horsfall.org) Received: from localhost (dave@localhost) by aneurin.horsfall.org (8.14.9/8.18.1/Submit) with ESMTP id 57FLxl7u067195 for ; Sat, 16 Aug 2025 07:59:47 +1000 (EST) (envelope-from dave@horsfall.org) X-Authentication-Warning: aneurin.horsfall.org: dave owned process doing -bs Date: Sat, 16 Aug 2025 07:59:46 +1000 (EST) From: Dave Horsfall To: The Eunuchs Hysterical Society In-Reply-To: Message-ID: References: <664f1cf9-ae56-11a5-1e94-f58e0ca23565@makerlisp.com> <20250815184408.E438DD7D00B1@ary.qy> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-GPG-Public-Key: http://www.horsfall.org/gpgkey.pub X-GPG-Fingerprint: 05B4 FFBC 0218 B438 66E0 587B EF46 7357 EF5E F58B X-Home-Page: http://www.horsfall.org/ X-Witty-Saying: "chmod 666 the_mode_of_the_beast" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-ID-Hash: VCQQ5D2HVZK5TLQRQQIAL5K6QFNUHNNV X-Message-ID-Hash: VCQQ5D2HVZK5TLQRQQIAL5K6QFNUHNNV X-MailFrom: dave@horsfall.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: C history question: why is signed integer overflow UB? List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 15 Aug 2025, Douglas McIlroy wrote: > Idle thought; There's been mention of 1's complement. If overflow is UB > because of that possibility, maybe ==0 should be, too! I understand that with ones-complement machines (such as the CDC series), a computation resulting in -0 will be normalised to 0 (but a bit inversion won't). -- Dave