29-01-2021, 03:21 PM
Please note that there is a definition of 'compatible type' in the glossary
Given the usual definitions of int32_t and int64_t, they cannot be the same size, so are never compatible.
Furthermore, for example, int and long are never compatible types, even on machines where they have the same size.
void foo(int x); and
void foo(long x); are always distinct overloads, even if int and long happen to be the same size
Given the usual definitions of int32_t and int64_t, they cannot be the same size, so are never compatible.
Furthermore, for example, int and long are never compatible types, even on machines where they have the same size.
void foo(int x); and
void foo(long x); are always distinct overloads, even if int and long happen to be the same size
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group