From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by sourceware.org (Postfix) with ESMTPS id 3DD1B3858C50 for ; Fri, 28 Jul 2023 17:06:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3DD1B3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=damon-family.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=damon-family.org Received: from smtpclient.apple ([173.166.40.17]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1MXHWM-1qNfaW1zZO-00Yiev for ; Fri, 28 Jul 2023 19:06:34 +0200 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Richard Damon Mime-Version: 1.0 (1.0) Subject: Re: [EXTERNAL]: Re: Why int32_t is long int on 32 Bit Intel? Date: Fri, 28 Jul 2023 13:06:23 -0400 Message-Id: <5F615A8B-DB01-4824-9486-4AD146D6B991@damon-family.org> References: In-Reply-To: To: newlib@sourceware.org X-Mailer: iPad Mail (20F75) X-Provags-ID: V03:K1:SS5StBDNanzAvhg4xfo9BfMg0PSq/htPAbcojbl9Ytnrb6THv2y xk5g6H1fTLYR7slH4oW75U0Cl7LsXwJ9c6oBmqDIOBZwq/DnOqQpW4wcKb5ng8hD7pE88cI k2ci/nbvOn4B1fwwPItlB3EEb/Lo5wFrIF9jepp1u9n09jNdpmoTZu9hcn+4mLPgMMjL+QR 0Mxy8FbbtpneWDlU8MdRQ== UI-OutboundReport: notjunk:1;M01:P0:gKEMCbGhq/g=;AO2MXRjvypIW8iVgGEQ8UUaP4W8 UHWajizkf9uVmRPonydbwCekkaSeFmFEOQFWT+0zFc4iPxxc7AuWN60Y6HC8sZmKVyy/E9Sro ZScfNYtZ/Lrsc89iWjTvNyJND4KHhZufxNnltLO0xEskcdLPMTmK+IPbTXfo1o/SvwQi4rULJ Up/rChZrfFACfh/0dCkiA4DOTr3opRq5hZll25Pw6FsGOBKp0s8ufFnB5Pv6nBB+hZoqBW6VT /jGU4Yh3Ig/0h+X8+HnsSsrMCzyhtH6qobIh2aOJFDShOKPLIwaJ8Bq8CklFvzI+sCvIIxAOt GmV4mHYA2WLzxjjiKDY8dj6xEVOeY8/Jw/koEuB5KyTbgKFSOGBwkBYAz6+XU51HtjGFbxEJj qyLf3TSsnof39a84tYHMXwnclzpe7WWFUGdwN6oKN91BO9Fo+0zIuls0LzkHocrz8Kdy8f+wi WTRSYKBx43NmZS70H6FuiRUfZU3OX1YEgxGLklzEIxv8bngEXnmi1xEt5u+yMDKLcX0fZsvj/ zxC+aVzj4kpN/Uq01mQwJUxxKTkmGdS5uRs6Xm/LYUjMGWp9SrWKbWo97WoQ4wZL+QuT0fRi+ nfuvHyMuH2gJeBQuc9LD05UgLmhiAdS/YY7HkdiFU515zIZEYer/7fXe6o/r3lD8YV9J5dGnG k660C5lid1iOnOLTwv/mweZKkcicnKUOtJbiZxSvFbx1TySoMM0ko6Mu9jFEYY9sfZY2fz583 Z21ZtlORhwwb64PYn46M4sCGwaOKpupXwYVdCeOdJ/GZYniyYxbEvWfYvql7OlfucLXwXFYB8 ru0hsfblvh7aI2uRL1WBPRbBguGEe6JxsyujNyT/8jdTX++69jdBqhfBTkzSF+YfGzjZa2QNu obWZ1XK4SCUSk+g== X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,KAM_ASCII_DIVIDERS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Actually, it is showing you are using the =E2=80=9Cwrong=E2=80=9D format. If= you are printing an int32_t, you should be using the format out of inttypes= .h to be correct, even if it is =E2=80=9Cugly=E2=80=9D. > On Jul 28, 2023, at 12:27 PM, Mike Burgess wro= te: >=20 > =EF=BB=BFStefan, I was referring to %zu. But, when the argument is int32_t= , one needs to correctly pick %d or %ld to avoid a senseless warning. Or, al= ways use %ld and=E2=80=94safely and without penalty=E2=80=94cast the argumen= t to long. But I dislike cluttering my code with casts that might hide futur= e defects. (Let's not have an argument about using printf at all, as this is= far beyond the scope of the original question.) >=20 > I guess does have definitions that _might_ solve this, but th= ey are awkward and by experience don=E2=80=99t always exist. >=20 > Mike >=20 >=20 > ________________________________ > From: Newlib on behal= f of Stefan Tauner > Sent: Friday, July 28, 2023 12:11 PM > To: newlib@sourceware.org > Subject: Re: [EXTERNAL]: Re: Why int32_t is long int on 32 Bit Intel? >=20 >> On Fri, 28 Jul 2023 15:49:25 +0000 >> Mike Burgess wrote: >>=20 >> Printf has a pretty good solution for size_t nowadays, but not so much fo= r int32_t. >=20 > It does. inttypes.h >=20 > -- > Kind regards/Mit freundlichen Gr=C3=BC=C3=9Fen, Stefan Tauner >=20 > ---------------------------------------------------------------------- > This email is from Coherent Corp. or a Coherent group company. The content= s of this email, including any attachments, are intended solely for the inte= nded recipient and may contain Coherent proprietary and/or confidential info= rmation and material. Any review, use, disclosure, re-transmission, dissemin= ation, distribution, retention, or copying of this email and any of its cont= ents by any person other than the intended recipient is strictly prohibited.= If you received this email in error, please immediately notify the sender a= nd destroy any and all copies of this email and any attachments. To contact u= s directly, please email postmaster@coherent.com. =20 >=20 > Privacy: For information about how Coherent processes personal information= , please review our privacy policy at https://ii-vi.com/privacy/.