stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <>
Subject [jira] Created: (STDCXX-496) [MSVC 7.1] printf("%#.2g", 0.0) incorrect output
Date Tue, 24 Jul 2007 01:02:31 GMT
[MSVC 7.1] printf("%#.2g", 0.0) incorrect output

                 Key: STDCXX-496
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
            Reporter: Martin Sebor

Moved from Rogue Wave Bugzilla:

$ cat t.cpp && cl t.cpp && ./t.exe
#include <assert.h>
#include <stdio.h>
#include <string.h>

int main ()
    char s [8];

    sprintf (s, "%#.2g", 0.0);
    assert (0 == strcmp ("0.0", s));
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

Assertion failed: 0 == strcmp ("0.0", s), file t.cpp, line 10

This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message