X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 	tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <49BC958D.2080306@cwilson.fastmail.fm>
References: <49BC958D.2080306@cwilson.fastmail.fm>
Date: Sun, 15 Mar 2009 08:32:33 +0000
Message-ID: <416096c60903150132g2f33c3a4od84b1122dcf4e92e@mail.gmail.com>
Subject: Re: long unsigned int vs. uint32_t again
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
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

Chuck wrote:
> cygwin's <inttypes.h> has:
> #define PRIu32 "lu"
>
> and <stdint.h> has
> typedef unsigned int uint32_t;
>
> Is it possible that our inttypes.h should be changed, to use "u" for 8, 1=
6, and 32 bits?

Yep, I'd say so.

>=A0Or is gcc's -Wformat=3D2 in 3.4.4 just too strict here -- and should be=
 checking
> the actual bitwidths of types against the formats, before assuming that
> "lu" doesn't match uint32_t?

No. "long" and "int" are different types, and ignoring this would just
store up trouble for when code is ported to platforms with 64-bit
longs.

Andy

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

