delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
From: | "Richard Stanton" <stanton AT Haas DOT Berkeley DOT EDU> |
To: | <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | Latest gcc/cygwin - bug in %e format specifier? |
Date: | Thu, 15 Jun 2000 09:52:01 -0700 |
Message-ID: | <000001bfd6ea$06f36910$524b2080@berkeley.edu> |
MIME-Version: | 1.0 |
X-Priority: | 3 (Normal) |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook 8.5, Build 4.71.2173.0 |
In-Reply-To: | <961048805.11767.ezmlm@sourceware.cygnus.com> |
Importance: | Normal |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
------=_NextPart_000_0001_01BFD6AF.5A949110 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit The latest net release of gcc seems to have a slight bug in the %e print format specifier. It prints garbage when you try to print a variable whose value is zero. For example, attached is a (very) short program that does nothing but print two variables, with values 0 and 1 respectively. I'd show the output, but it contains several null characters which don't seem to cut/paste very well. The basic result is that the 1 variable works fine. The zero variable prints stuff it shouldn't. To test, just run "gcc testit.c -o testit" Then run testit. Optimizations don't seem to matter. Richard Stanton ------=_NextPart_000_0001_01BFD6AF.5A949110 Content-Type: application/octet-stream; name="testit.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="testit.c" #include <stdio.h> int main(int argc, char *argv[]) { double tt = 0.0; double uu = 1.0; printf("tt = %e\n", tt); printf("uu = %e\n", uu); return 0; } ------=_NextPart_000_0001_01BFD6AF.5A949110 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com ------=_NextPart_000_0001_01BFD6AF.5A949110--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |