From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by sourceware.org (Postfix) with ESMTPS id 911423858C00 for ; Sat, 29 Jul 2023 13:20:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 911423858C00 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.at Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.at DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1690636799; x=1691241599; i=stefan.tauner@gmx.at; bh=wrctUSK7rTvd7cCFEBeR1L/ZFoUU/QtZ0mA0y80o1c0=; h=X-UI-Sender-Class:Date:From:To:Subject:In-Reply-To:References; b=VhXhmkt1HlO2ZXlCIcOnWhDHJvhgjTbey07wxoENmAcDE+eNeEVEnN6DGhDcBKzZfvcTh4+ VL4ERJ09D/X0q79y3rI+WE3C3qkLP6M5o7T/C1ipo31sl4UIdO9R66Bw78E0HAF8hQdt+FFG8 lVb/urWK24nJqWPQoikw60Zvah20Ech0bVil0QJYSJjJP2BsOus2U9RhWgFjo5Pkd22sjOmXv FdaRYPXwjh9ru7qIZe616hSZwQJc40+iTv5eRJagA89ov6PR/qTpld6k1+BHwqmt0u8rwL1X4 cUakvcAZBMFVkB5yO3tJcL69vi6trM16+0yo/HwUVKKauY/d84hQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from legacy ([80.109.83.31]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MgNcz-1pwRua0HHz-00hsVZ for ; Sat, 29 Jul 2023 15:19:59 +0200 Date: Sat, 29 Jul 2023 15:19:58 +0200 From: Stefan Tauner To: newlib@sourceware.org Subject: Re: [EXTERNAL]: Re: Why int32_t is long int on 32 Bit Intel? In-Reply-To: References: <6408c9e9-6bae-1032-58f5-8b1a302b1756@Shaw.ca> <18BB0DD5-57EA-4B82-8807-72AEA51CA719@iki.fi> <5R8qxH6_HYtlUHJwlmty3kXezOsTViDs7SS5LKuaYjuv0deTlTbaqrPDHb9jMAlRkhEPjUvslRMThonV8TOEnmMvOXKFEAk5DZAGXvfmubA=@protonmail.com> <0e3601d9c191$646f6160$2d4e2420$@beniston.com> <0e7901d9c19d$e5029c00$af07d400$@beniston.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID: <1Mq2nA-1q4Riv0aPK-00n9QW@mail.gmx.net> X-Provags-ID: V03:K1:HxEVgonzeoNXBB0Ek06VA6UIjtrWbhsuv7LKCpGGkLShfP/35EA 32JDJXO0GmzYOY52bT54dSB6G5k5M1kbgRKVzq2pHUCR1feJgHHzYF/OkFwbomkFmMrniNH T+orQ1Ab+ISkNG/YMUpgTrLuMlk9WTCtvLOTrW3AwjgUY3HptNccPB/feYflE+wq3NZdCjy FajL8N5M22OKAHr8RnU1w== UI-OutboundReport: notjunk:1;M01:P0:8FYtO6oCqzE=;UCgDu0LSnb4zlhrBgRGMTZe3jiE AHZfGrwYORZpLNGNklltlq/8hZXZ0hU8mkOnyQaZ746UM0fDGs/5yaL210FCeVMxWuBPJqjuj url/rU1+zNauYSt5pWrhj3I5NirtSE1UDx2/FkNnLNCHAXE9FYpgVsusrTS46vlLbUXbqMaEf NQQ1JbZ6qtPVEmuPVtfJKPD3p5qab1hGponTA+npijpxgYBRZvVLtdLI5xa3l5p+9lGsMXK5L PyLrmePio2LtR4meUElgGtSqom8gVDllsg5C06HSD2gEDKil8Umv/4CiQpcdZ34wiE5pemGf1 aHGxSjbZqfcasZXve5T3M8sfgiS1Qs+YwF/pstAErHTcXa5Yp1QQE/5cuOZRE+KiDPtks21dT AhqPtgnCOC//SZ8REa6ChmM/gWJCyfEsjB1/gtzecNZzl53dWp3DbF30/JZBmRHFPDSv5jrLI JmOEnIBhxlD4n2sB5RG1eNikYbJR6wmebxBQGb45vod4UytgQPUpsd1ctwmw7szWemsM+hFDg 1DOZKiyQqmn5PdfKv/6+nFCmBGo32qUYjjoTHCXu1BzT6n+77DEKOtt4FheVjkcMjDgJoMgb/ OVjt0UKPC9t++hjIninopKcR0WdV6BoFXyIO32467vhtKKuMQU3Ve21nrwoufLi2gCZI+am/p YpC66FGLeWy/7F/CSjUI+J3VBf+d6twOikC15o797n+DEXtyeXTS5V6X3CKzctXCNSQnBqAr2 D6vD239yWRTOHvwt/oPAQpE0MmldIsYEqLA/sdSI3GQFaIBrih0nXB783gna1a5vhveYTQKFc 16lJ5spAzrJKz6C5oKPAl6ZtPN6zs1X9bCCiegESqJfqfDu2V4kOu5Fe4/2XXudWrdEr2+vth v4dUozwLcI+Z0xR61a9SSOzDVw8gIUL074d4FJwM1RXsLctq3AZMt4sIoA+Oj0EwSrxuaCP6H S/DNiA== X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, 29 Jul 2023 08:47:22 -0400 Trampas Stern wrote: > Most code and libraries, like FAT libraries, all assume a char is 8bit. Well, it's mandated by POSIX to be 8 bits and in general a quite reasonable assumption (if targeting POSIX systems) but not necessarily true elsewhere... and if you depend on the signedness of char you are doing it wrong too. If you want 8 unsigned bits you should use uint8_t instead of char. In that regard it's quite similar to the int "problem". In either case there is a proper solution in C that is working on all conforming systems. > right shift sign extended. Right shifts of negative integers is UB in C (and not necessarily sign-extended) if that's what you mean. We are also quite off-topic already IMHO... --=20 Kind regards/Mit freundlichen Gr=C3=BC=C3=9Fen, Stefan Tauner