X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=BDA wZxJAEyOygO4zzwCYGkOLQWSrOUxVxr9DAlRXrJfZNmcehBYp34uETzQxK/gPB5C 0293rcexcAdMgDaeDT6dC63VdDfOcc9xOuoxXV9mzi0n+v45qHCPQoyyXOv4JLcK udE3yUdLf++4/Xu8EJ3rsY/Ccsd9MI93MJl23pF0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=VXSm+6bvY 3Kk93VIAbbQXVJ6njQ=; b=sbA8pJriyKb48Bu8LGJaDkN98k/oG+lY3KWVzGPzP vPPURR5C+L8k+L+yxX31d6VqV92oZgbBjh8o19e2rRzAMNTjfD6CLat6VEcfqh4C ScYPtKrsjxm2eyFYqIyYo2uZaPubvV73UOsSMXcb5/glEIet4yxIruDbY46wkS76 +o= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_40,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: nm19-vm6.access.bullet.mail.gq1.yahoo.com X-Yahoo-SMTP: 0z5TJLmswBDohOc2QznCIeoaEiEalQiTSMLFNdKdTt4t X-Rocket-Received: from 2600kPC (aschwarz1309 AT 75 DOT 22 DOT 34 DOT 23 with plain [67.195.15.5]) by smtp117.sbc.mail.gq1.yahoo.com with SMTP; 28 May 2014 15:53:18 +0000 UTC From: "Arthur Schwarz" To: Subject: gcc 4.8.2 runtime library error Date: Wed, 28 May 2014 08:53:08 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Win 7 64-bit gcc 4.8.2 (64-bit) ret: http://stackoverflow.com/questions/23900921/c-scanf-la-returns-0 I don't know whether cygwin or gcc.org maintains the runtime library. If this is the wrong location I'll redirect this e-mail. sscanf() doesn't handle "%la" correctly and crashes on "%a". Sample code and output: # include # include # include # include #include using namespace std; int main(int argc, char** argv) { char buffer[30]; double x = 5.0; sprintf(buffer, "%a", 1.2); sscanf(buffer, "%la", &x); cout << " Example 1.2 buffer -> " << buffer << endl; cout << " Example 1.2 scanf <- " << x << endl; return 0; } output Example 1.2 buffer -> 0x1.3333333333333p+0 Example 1.2 scanf <- 0 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple