From: kuku AT gilberto DOT physik DOT rwth-aachen DOT de (Christoph Kukulies) Subject: Re: printf and long long 26 Apr 1997 14:40:59 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199704261727.TAA04887.cygnus.gnu-win32@gilberto.physik.rwth-aachen.de> Reply-To: Christoph Kukulies Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit In-Reply-To: <9704242041.AA37542@marc.watson.ibm.com> from Marc Auslander at "Apr 24, 97 04:41:27 pm" Original-To: marc AT watson DOT ibm DOT com Original-Cc: gnu-win32 AT cygnus DOT com X-Mailer: ELM [version 2.4ME+ PL28 (25)] Original-Sender: owner-gnu-win32 AT cygnus DOT com > 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 914 945-4346 (Tieline 862 Fax x4426) > > > - > For help on using this list (especially unsubscribing), send a message to > "gnu-win32-request AT cygnus DOT com" with one line of text: "help". > -- Chris Christoph P. U. Kukulies kuku AT gil DOT physik DOT rwth-aachen DOT de - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".