delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/03/07:21:18

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B41AA8C.63E318B2@irisa.fr>
Date: Tue, 03 Jul 2001 13:20:44 +0200
From: Tanguy Risset <risset AT irisa DOT fr>
X-Mailer: Mozilla 4.7 [fr] (WinNT; I)
X-Accept-Language: fr
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 1.3.2 bug with scanf and long long int


Hello

I cannot use scanf with long long int, the negative integer are not
scanned correctly
see the program below.
I'm using the cygwin version 1.3.2 on WindowsNT


Thanks for your help

Tanguy Risset

#include<stdio.h>
int main() {
    long long int x;

 scanf("%lld",&x);
  printf("x == %lld\n",x);

  return;
}


execution:

gcc test1.c
a
-1
x == 4294967295



--
| Tanguy Risset                 Tel (from France): 02-99-84-74-60
| Irisa                         Tel (not from France): +33 2-99-84-74-60

| Campus de Beaulieu            Fax: +33-(0)2-99-84-71-71
| 35042 Rennes                  E-Mail: risset AT irisa DOT fr
| FRANCE                        http://www.irisa.fr/api/HOMEPAGE/Risset/




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019