From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 199D43857C52 for ; Wed, 11 Nov 2020 17:54:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 199D43857C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: jg1DhaQxFx/1TO3UmoMTyFfQ3g+9tqKyP7whIOdpnlhb+xSin7Wu9+8PuZbPAExVb7WYwqtmHr jNepQ1d4crTB+vJ712kZR54d9rtMfB55Im99smgbCvxnZpGmpjodsgPDelV4fAFY1gioezqyIW 5+Qkp8q3GwkAp4TioCLCYOj1AMte+FrD9GWQIPmeO9qblCbx8Fm30k14b2VfR6ctTjzZg0elfZ gYm633c3r+ltJRhjjyYxqJ+Iru6+8ajFZQkod3JrbWs6WlcYnp47L+9rvKgjUe92/Xdnb3vr9L 2Rg= X-IronPort-AV: E=Sophos;i="5.77,470,1596528000"; d="scan'208";a="57247176" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 11 Nov 2020 09:54:25 -0800 IronPort-SDR: xa0NO6mvzbeex3zAh1WyRC1k8R7qZt6Yk16qzDvcqXONcH8OkdNDSP7PA75MwzF5D6DU05jfIO dt+v+S50gUqxY/sq7suotbjBJGWUrpkL0MlKwOdyC+/ANbWBrr2bPpmFvmjmMKyD09kk+qOpck uWW4/h8P17Lgn8BJENJZZblTbfiS3zt6wq1fm0Eqg23ip8eF8zyaewrPXdN9EKJ0rDPOqsP4WF QXWXXrN0bR1TpY/vas6mnwDsbk+Z5RKAY6qZmGTzRtEEUoG9P36ObXNsk2LLE8P1kIP4MVgbtu WwY= Date: Wed, 11 Nov 2020 17:54:21 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Jakub Jelinek CC: Stefan Kanthak , Subject: Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function In-Reply-To: <20201111095509.GI3788@tucnak> Message-ID: References: <116F1589A8244FB494091BCD4E6398AB@H270> <20201110235305.GE3788@tucnak> <7ACCC74B62494C2AB3DB97BA1983164B@H270> <20201111095509.GI3788@tucnak> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3125.5 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2020 17:54:28 -0000 On Wed, 11 Nov 2020, Jakub Jelinek via Gcc-patches wrote: > So indeed, 0x80 << 24 is UB in C99/C11 and C++98, unclear in C89 and > well defined in C++11 and later. I don't know if C2X is considering > mandating two's complement and making it well defined like C++20 did. C2x requires two's complement but that's only about representation; there are no changes so far to what shifts are undefined. -- Joseph S. Myers joseph@codesourcery.com