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 49EAA3100C for ; Sat, 16 Aug 2025 08:01:58 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id AB74E43C6D; Sat, 16 Aug 2025 16:01:51 +1000 (AEST) Received: from junk.nocrew.org (junk.nocrew.org [51.15.56.219]) by minnie.tuhs.org (Postfix) with ESMTPS id 7968443C6A for ; Sat, 16 Aug 2025 16:01:43 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=junk.nocrew.org) by junk.nocrew.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1un9z3-008SOh-10; Sat, 16 Aug 2025 06:01:41 +0000 From: Lars Brinkhoff To: Warner Losh Organization: nocrew References: <664f1cf9-ae56-11a5-1e94-f58e0ca23565@makerlisp.com> <2e3d71c9-167e-b5d7-0d68-516248d91cf3@makerlisp.com> Date: Sat, 16 Aug 2025 06:01:40 +0000 In-Reply-To: (Warner Losh's message of "Fri, 15 Aug 2025 12:03:46 -0600") Message-ID: <7wjz33vm7v.fsf@junk.nocrew.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: lars@nocrew.org X-SA-Exim-Scanned: No (on junk.nocrew.org); SAEximRunCond expanded to false Message-ID-Hash: ST4WZP3T3WT7DQQBC47DCMYKZ4NQP6SU X-Message-ID-Hash: ST4WZP3T3WT7DQQBC47DCMYKZ4NQP6SU X-MailFrom: lars@nocrew.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 CC: Luther Johnson , tuhs@tuhs.org 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: Warner Losh writes: > I suspect that it was the absence of a signed right shift. In my > Decsystem-20 OS class, one of the differences between the compiler on > the VAX and the compiler on the '20 was that -1 >> 1 was -1 on the VAX > and 2^35-1 on the '20. The DEC-20 (aka PDP-10) does have a signed right shift instruction. Apparently the compiler didn't use it.