Pass a uint32_t
to a function that requires uint64_t
: You can do this, and all compilers I know accept it, even in strict modes.
- Is it explicitly allowed by the standard?
- Is it safe?
- What does MISRA-C say about this?
void MyFunction(uint64_t arg) {}
int main(void) {
uint32_t xyz = 1u;
MyFunction(xyz);
}
You need to sign in to view this answers