[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Strange error with 5.4 random generator on old compiler
- From: bil til <biltil52@...>
- Date: Sun, 27 Nov 2022 17:46:00 +0100
Am So., 27. Nov. 2022 um 12:40 Uhr schrieb Alexander Riegler
<alexriegler12@gmail.com>:
>
> To test c89 compatibility, i wanted to compile lua 5.4.4 on a very old version of MSVC. The compiler complains about the line 270 of lmathlib.c "#if (ULONG_MAX>>31>>31)>=3" with "Fatal error C1012:
In limits.h ULONG_MAX is defined like this:
#if __sizeof_long == 8
#define ULONG_MAX 0xffffffffffffffffUL
#else
#define ULONG_MAX 0xffffffffUL
#endif
The first case looks weird to me ... I think this should write
#define ULONG_MAX 0xffffffffffffffffULL (ULL instead of UL).