Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sun, 25 Jan 2004 10:30:57 +0100
From: "Gerrit P. Haase" <gp@familiehaase.de>
Reply-To: "Gerrit @ cygwin" <cygwin@cygwin.com>
Organization: Esse keine toten Tiere
Message-ID: <1517831880.20040125103057@familiehaase.de>
To: =?ISO-8859-2?B?RGFuaWVsIEplbGnxc2tp?= <dumbass@wp.pl>
CC: cygwin@cygwin.com
Subject: Re: printf does not print long long ints properly
In-Reply-To: <opr1877gqc89ubik@smtp.wp.pl>
References: <opr1877gqc89ubik@smtp.wp.pl>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

Hallo Daniel,


#include <stdio.h>
main()
{
 long long i;
 i=1000000;
 i*=1000000;
 printf("%lld",i);
 return 0;
}

$ ./printf
1000000000000



Am Samstag, 24. Januar 2004 um 01:41 schriebst du:

> when I compile the following program:

> #include <stdio.h>
> main()
> {
> long long i;
> i=1000000;
> i*=1000000;
> printf("%Ld",i);
> return 0;
> }

> I get the following:
> -727379968
> instead of the expected 1000000000000

> I am using gcc 3.3.1
> the same code works nicely on linux machine with gcc 3.3.1

> is any other information necessary?



HTH,
Gerrit
-- 
=^..^=



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

