I am testing gcc version 8.2
gcc seems to be treating long long int
as int
. Is there any way to fix this?
Here is the code:
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <float.h>
int main(int argc, char** argv) {
printf("INT_MAX : %d\n", INT_MAX);
printf("INT_MIN : %d\n", INT_MIN);
printf("LONG_MAX : %ld\n", (long) LONG_MAX);
printf("LONG_MIN : %ld\n", (long) LONG_MIN);
printf("UINT_MAX : %u\n", (unsigned int) UINT_MAX);
printf("ULLONG_MAX : %lu\n", (unsigned long long int) ULLONG_MAX);
printf("Big Integer : %lu\n", (unsigned long long int) 1234567890123456);
printf("%d\n", sizeof(long long int));
return 0;
}
output:
INT_MAX : 2147483647
INT_MIN : -2147483648
LONG_MAX : 2147483647
LONG_MIN : -2147483648
UINT_MAX : 4294967295
ULLONG_MAX : 4294967295
Big Integer : 1015724736
8
C:\prog_c\c_pro>gcc --version gcc (MinGW.org GCC-8.2.0-5) 8.2.0 Copyright (C) 2018 Free Software Foundation, Inc...