On 20 September 2017 at 07:58, Volker Braun <[email protected]> wrote:
> IMHO its a code smell if your code doesn't work on 32-bit platforms. > Remember, almost all 32 bit platforms are perfectly capable of working with > 64-bit integers (just not as fast). But your code must be *correct* (e.g. > use uint64_t), and not just coincidentally work on some compiler/platform > but not guaranteed so by any C language standard. > If the opinion of the author of the program is "life is too short to worry about overflowing a 32-bit integer", which is what was stated, it is unlikely that the author used uint64_t. The C standard has changed over the years, so what was perfectly normal at one point, may no longer be. I recall hitting a problem on a Cray, where sizeof(short) == sizeof(int) == sizeof(long) == 8. These 32-bit/64-bit problems *should* be relatively easy to fix if is C. I've hit a number of these over the years using 64-bit Solaris, where the default it to build 32-bit, but both can be built. I recall in the past some packages in Sage building partially 32-bit bit, and partially 64-bit, then when the linker tried to link the separate object files, so things did not work. These problems were all overcome. Dave -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
