1 msgWide Streams
4 msgMINGW I/O support for file sizes > 2GB (LFS ...
2 msg#define WINVER 0x0400
11 msgWhy does g++ not link with libstdc++?
3 msghow to compile and link a library
1 msgHey Guys
5 msgCompile error using mingw
2 msg'include/c++/ext' missing fromgcc-part-c++-4.3....
1 msgFMTID_SummaryInformation andFMTID_UserDefinedPr...
2 msghow to realize mouse programming
3 msglooking for tiny light cross platform filesyste...
2 msgMinGW GCC Development Plan
3 msghow to use the read/write
74 msgGCC 4.3.0 20080502 (alpha) Released - Please he...
10 msgMinGW gcc 3.x, 4.x and exceptions
4 msgdllwrap 2.17.50 20060824

strtod is not C99-compatible
\ Ramiro Polla (1 May 2008)
. \ Brian Dessent (1 May 2008)
. . \ Ramiro Polla (1 May 2008)
. . . \ Ramiro Polla (1 May 2008)
. . . . \ Keith Marshall (2 May 2008)
. . . . . \ Ramiro Polla (2 May 2008)
. . . . . . \ Keith Marshall (2 May 2008)
. . . . . . . \ Chris Sutcliffe (3 May 2008)
. . . . . . . . \ Danny Smith (4 May 2008)
. . . . . . . . . \ Ramiro Polla (6 May 2008)
. . \ Charles Wilson (1 May 2008)
. \ Brian Dessent (1 May 2008)

4 msgTest program crashes with g++ 4.2.1-dw2 usingli...
25 msgimlib2
3 msgDisassembly of stack frame
Subject:strtod is not C99-compatible
Group:Mingw-users
From:Ramiro Polla
Date:1 May 2008


 
Hello,

According to [0], strtod() should be able to parse hexadecimal numbers.
But in Windows[1], it doesn't.

This simple test program:
#include <stdlib.h>
#include <stdio.h>

int main()
{
const char *string = "0x00800000";
char *end;
double value;

value = strtod(string, &end);

printf("string \"%s\"\n", string);
printf("end \"%s\"\n", end);
printf("value %f\n", value);

return 0;
}

should print:
string "0x00800000"
end ""
value 8388608.000000

but instead it prints:
string "0x00800000"
end "x00800000"
value 0.000000

Is it possible that a function to replace strtod() with a C99-compliant
implementation be made the same way it was done with snprintf? And then
one would have to call _strtod to get the original MSVCRT version.

Ramiro Polla
[0] http://www.opengroup.org/onlinepubs/000095399/functions/strtod.html
[1] http://msdn.microsoft.com/en-us/library/kxsfc1ab(vs.71).aspx

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


© 2004-2008 readlist.com