X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <490B21E9.80807@lysator.liu.se>
Date: Fri, 31 Oct 2008 16:19:05 +0100
From: Peter Rosin <peda@lysator.liu.se>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: cygwin g++ strictness
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>
In-Reply-To: <20081031135011.GB15518@calimero.vinschen.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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

Den 2008-10-31 14:50, skrev Corinna Vinschen:
> On Oct 31 07:26, Eric Blake wrote:
>> But yes, it might be nice if cygwin used the same type as Linux, as we
>> claim to strive for Linux source compatibility.
> 
> Why exactly?  The important thing here is that int32_t is 32 bit wide,
> regardless of using int or long as base type.

I some projects I'm involved with there's quite a bit of the following:

$ cat int.c
#include <stdio.h>
int
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)
If the portable thing to do is casting all printf arguments,
I'm not sure the remedy is worth the damage. But all those
warnings are definitely an annoyance...

In short, I for one would be very glad to see "typedef int
int32_t" (but I'm not a g++ user).

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/

