This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygwin g++ strictness
- From: Peter Rosin <peda at lysator dot liu dot se>
- To: cygwin at cygwin dot com
- Date: Sat, 01 Nov 2008 15:18:14 +0100
- Subject: Re: cygwin g++ strictness
- References: <490A30C8.5000107@sh.cvut.cz> <001601c93b31$a961b940$4001a8c0@mycomputer> <003e01c93b42$e92a17a0$4001a8c0@mycomputer> <490AE8A0.8090009@sh.cvut.cz> <001a01c93b4d$617de150$4001a8c0@mycomputer> <490AF1E3.3020308@sh.cvut.cz> <007401c93b56$ebcfa510$4001a8c0@mycomputer> <490B0084.1070803@sh.cvut.cz> <008a01c93b5a$9338d300$4001a8c0@mycomputer> <490B078B.9030007@byu.net> <20081031135011.GB15518@calimero.vinschen.de> <490B21E9.80807@lysator.liu.se> <490B25A9.5010806@byu.net>
Den 2008-10-31 16:35, skrev Eric Blake:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Peter Rosin on 10/31/2008 9:19 AM:
>> main(void)
>> {
>> 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)
>
>
http://www.opengroup.org/onlinepubs/009695399/basedefs/inttypes.h.html#tag_13_20
>
> #include <inttypes.h>
>
> int32_t i;
> printf("%"PRId32"\n",i);
Thank you! Exactly what I was looking for.
Cheers,
Peter
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/