X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: 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> Subject: RE: cygwin g++ strictness Date: Fri, 31 Oct 2008 15:42:29 -0000 Message-ID: <02bd01c93b6f$4858d640$9601a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <011601c93b6e$49bbb710$4001a8c0@mycomputer> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com John Emmas wrote on 31 October 2008 15:35: > 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? The /only/ assumptions you may legitimately make are those encoded in the C language spec: sizeof (char) <= sizeof (short) <= sizeof (int) <= sizeof (long) <= sizeof (long long). But "<=" means less than OR equal, and you can't assume /which/ of those two. > I'd be surprised if there's a programmer amongst us who can honestly say > he wouldn't have made that assumption. It's worked in the past. But now there are 64-bit platforms in common use and we all have to be aware. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/