Yo Greg! On Thu, 20 Nov 2025 19:25:13 -0500 Greg Troxel <[email protected]> wrote:
> > On Thu, 20 Nov 2025 08:23:19 -0500 > > Greg Troxel <[email protected]> wrote: > > > >> Code that fails on 32-bit CPUs is still wrong on 64-bit CPUs. It's > >> just a latent bug that we don't notice. > > > > Not always. For example, some u-blox 64-bit fields that work when > > stuffed into 64-bit ints, but lose precision when stuffened into > > 32-bit ints. > > That's wrong! If the field from the device is 64 bits, it's an error > to put it in an "int", which the standard does not require to be any > particular size. If you need 64 bits, then use int64_t (etc.). Yes, we agree. Per the standard it is an error. But, it still happens, and even works. Without compiler warnings. In the 64bit CPU case. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 [email protected] Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin
pgpxGhPc2ae2m.pgp
Description: OpenPGP digital signature
