delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/01/09:21:03

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <490C6526.9010102@lysator.liu.se>
Date: Sat, 01 Nov 2008 15:18:14 +0100
From: Peter Rosin <peda AT lysator DOT liu DOT se>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin g++ strictness
References: <490A30C8 DOT 5000107 AT sh DOT cvut DOT cz> <001601c93b31$a961b940$4001a8c0 AT mycomputer> <003e01c93b42$e92a17a0$4001a8c0 AT mycomputer> <490AE8A0 DOT 8090009 AT sh DOT cvut DOT cz> <001a01c93b4d$617de150$4001a8c0 AT mycomputer> <490AF1E3 DOT 3020308 AT sh DOT cvut DOT cz> <007401c93b56$ebcfa510$4001a8c0 AT mycomputer> <490B0084 DOT 1070803 AT sh DOT cvut DOT cz> <008a01c93b5a$9338d300$4001a8c0 AT mycomputer> <490B078B DOT 9030007 AT byu DOT net> <20081031135011 DOT GB15518 AT calimero DOT vinschen DOT de> <490B21E9 DOT 80807 AT lysator DOT liu DOT se> <490B25A9 DOT 5010806 AT byu DOT net>
In-Reply-To: <490B25A9.5010806@byu.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019