cygwin g++ strictness

Peter Rosin
Fri Oct 31 15:25:00 GMT 2008

Den 2008-10-31 14:50, skrev Corinna Vinschen:
> On Oct 31 07:26, Eric Blake wrote:
>> But yes, it might be nice if cygwin used the same type as Linux, as we
>> claim to strive for Linux source compatibility.
> Why exactly?  The important thing here is that int32_t is 32 bit wide,
> regardless of using int or long as base type.

I some projects I'm involved with there's quite a bit of the following:

$ cat int.c
#include <stdio.h>
	int32_t i = 32;
	printf("%d", i);
	return 0;
$ gcc -c -Wall int.c
int.c: In function `main':
int.c:6: warning: int format, int32_t arg (arg 2)
int.c:6: warning: int format, int32_t arg (arg 2)

What should the format specifier be to not have that warning
on neither Cygwin nor Linux? (or anywhere for that matter)
If the portable thing to do is casting all printf arguments,
I'm not sure the remedy is worth the damage. But all those
warnings are definitely an annoyance...

In short, I for one would be very glad to see "typedef int
int32_t" (but I'm not a g++ user).


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list