Suppose you have the following snippet of code:
include <stdio.h>
size_t nodeID = 5;
printf("nodeID = %lu", nodeID);
This will run without any warning being raised on a 64bit system but will generate a conversion warning for %lu on a 32bit system.
We can deal with it using the %z modifier
However this doesn't work on Visual Studio which uses the "I" modifier.
Is there any method available that solves this both in a architecture-independent and OS-independent way?