51 posts
Moving from C99 to C89

I have been using C99, but would like to switch to C89 because it is simpler, but I get this warning when I use uint64_t:

warning: use of C99 long long integer constant [-Wlong-long]

If I turn the warning off will it cause problems?

#include <stdint.h>
#include <stddef.h>
#include <limits.h>
#include <float.h>


Mārtiņš Možeiko
2378 posts / 2 projects
Moving from C99 to C89
Edited by Mārtiņš Možeiko on

c89 does not have 64-bit integers. You need to use compiler extensions for 64-bit integer support in c89. For example, in MSVC that is builtin __int64 type.

stdint.h is c99 header, it does not exist in c89 standard. So if you want your code be compatible with c89 compiler, you cannot include this header.