Currently __INT64_C() doesn't add any suffix to provided constant which
causes the constant to have 'int' type. On the other side, __UINT64_C()
adds ULL suffix which makes the constant 'unsigned long long'.
Of course, __INT64_C() is wrong here because int type, in most cases,
has 32 bit width.
According to the C standard, these macros are for minimum-width integer
constants. For example, it means that using INT16_C() macro will give
you constant with type the same as int_least16_t type.
Clang doesn't provide defines like __INT_LEAST16_C_SUFFIX__, which makes
implementation difficult, because we need to determine appropriate type
first.
This PR also removes the integer constant macros (these not prefixed with __) from llvm.h,
since we use definitions from stdint.h (more details can be found in commit message).
Currently
__INT64_C()
doesn't add any suffix to provided constant which causes the constant to have 'int' type. On the other side,__UINT64_C()
addsULL
suffix which makes the constant 'unsigned long long'.Of course,
__INT64_C()
is wrong here becauseint
type, in most cases, has 32 bit width.According to the C standard, these macros are for minimum-width integer constants. For example, it means that using
INT16_C()
macro will give you constant with type the same asint_least16_t
type.Clang doesn't provide defines like
__INT_LEAST16_C_SUFFIX__
, which makes implementation difficult, because we need to determine appropriate type first.This PR also removes the integer constant macros (these not prefixed with
__
) from llvm.h, since we use definitions from stdint.h (more details can be found in commit message).