delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/31/10:39:53

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=xe8BsctaAAAA:8 a=L4qh1aPy6xXuLYL96IYA:9 a=wIhUJj5I7aXAMFdEp4p_6_M03TkA:4 a=eDFNAWYWrCwA:10 a=rPt6xJ-oxjAA:10
Message-ID: <490B268D.3010801@byu.net>
Date: Fri, 31 Oct 2008 09:38:53 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666
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> <011601c93b6e$49bbb710$4001a8c0 AT mycomputer>
In-Reply-To: <011601c93b6e$49bbb710$4001a8c0@mycomputer>
X-IsSubscribed: yes
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to John Emmas on 10/31/2008 9:35 AM:
> question - when programming like this:-
> 
> int32_t i = 32;
> printf("%d", i);
> 
> is it reasonable for a programmer to assume that a type declared as int32_t
> will be compatible with "%d" when building for a 32-bit platform?

It is not portable to platforms with 16-bit int (although these days, such
platforms are museumware).  You can probably ignore the warning on 32-bit
platforms, but the better fix is to make your code portable by using
<inttypes.h>.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkLJo0ACgkQ84KuGfSFAYD5tgCffx96+bqLE/1oyKEAfqY8GDYx
BQMAoLOiBDw4lk+ucH0QIm9QpgBzr6HC
=LoTO
-----END PGP SIGNATURE-----

--
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