I have been working on a program which contains code of the following nature.
printf("%lld",somelonglongint)
I am however working on a sparc platform where long long is 64 bit and int and long int are 32 bit even on 64 bit builds. If by mistake a line of code creeps in that reads
printf("%d",somelonglongint)
There is no compiler warning even with -Wall, nothing, but this code will cause the program to print nonsense, or often cause the program to seg fault. Is there any way of forcing gcc to at least warn on this, and preferably error since the result is catastrophic