This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: printf and long long
- To: marc at watson dot ibm dot com
- Subject: Re: printf and long long
- From: Christoph Kukulies <kuku at gilberto dot physik dot rwth-aachen dot de>
- Date: Sat, 26 Apr 1997 19:26:59 +0200 (MET DST)
- Cc: gnu-win32 at cygnus dot com
- Reply-To: Christoph Kukulies <kuku at gilberto dot physik dot rwth-aachen dot de>
> It appears that printf of long long is broken. The value printed is
> wrong, and subsequent arguements are mishandled. All this works
> correctly on AIX gcc. A test case which faults on gnu-win32 is:
>
> main()
> {
> long long l;
> l=1000000000;
> l=l*10;
> printf("%lld %s\n",l,"test");
gcc 2.7.2.1 FreeBSD:
Segmentation fault.
changing it to:
printf("%qd %s\n",l,"test");
works.
10000000000 test
> }
>
> If you don't try to print the second arg, you just get a bad value.
>
> I didn't see anything in the archives about this.
>
>
> Marc Auslander <marc@watson.ibm.com> 914 945-4346 (Tieline 862 Fax x4426)
>
>
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
>
--
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".