Re: 2038
Really?
I have done so in C quite happily for 32-bit code in DOS, Windows (compilers 6.0 and 2018), Linux (32 and 64-bit), and in the past Solaris. And it all works.
Try this:
#include <stdint.h>
#include <stdio.h>
int main()
{
uint32_t uu;
int32_t ii = -1;
uu = (unsigned)ii;
if(ii == uu) printf("test 1 OK\n");
if(uu == (unsigned)-1) printf("test 2 OK\n");
return 0;
}
$ gcc -Wall itest.c -o itest
./itest
test 1 OK
test 2 OK