X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
From: "Gary R. Van Sickle" <g.r.vansickle@worldnet.att.net>
To: <cygwin@cygwin.com>
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> <011601c93b6e$49bbb710$4001a8c0@mycomputer> <490B268D.3010801@byu.net>
Subject: RE: cygwin g++ strictness
Date: Fri, 31 Oct 2008 23:02:12 -0500
Message-ID: <AD4006A86F9C4CDA97D99556B68434C9@DFW5RB41>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <490B268D.3010801@byu.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> From: Eric Blake
> 
> -----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).

That, or:
- Running your car's engineware.
- Exploding an airbag into your face on detecting a collisionware.
- Recording your vital signsware.
- Pumping insulin into youware.
- Doing your laundyware
- Computerized exercise machinewear
- Microwaveware
- A billion other products with 8- and 16-bit microcontrollers in themware.

CSci doesn't begin and end with the CPU currently on our desks!

>  You can probably 
> ignore the warning on 32-bit platforms, but the better fix is 
> to make your code portable by using <inttypes.h>.
> 

Well, yeah.  There's always the option to not Do The Right Thing(tm), but my
personal experience is that correct way is usually also the easiest way.

-- 
Gary R. Van Sickle


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

