Closed WarrenWeckesser closed 1 week ago
the code in question here is part of libc++ which itself is part of LLVM. If you really think this is a bug perhaps its best to file that bug upstream?
Ah, right. In fact, there is already this: https://github.com/llvm/llvm-project/issues/56261
Sorry for the noise!
This is main.cpp:
Here are the commands I use to build and run it:
I expect the first output of
x
to be the same as the second (other than possibly the last digit or two).It looks like the culprit is the use of
static_cast<double>(__value)
here: https://github.com/emscripten-core/emscripten/blob/77448a918c9004e43470c251d0d8d33ce7b5fce3/system/lib/libcxx/src/charconv.cpp#L44-L47Personally I would rather have an error than a silent cast to
double
.I labeled this issue a bug report, but you might not consider it a bug. In that case, this is an enhancement request!
Version of emscripten/emsdk:
Full link command and output with
-v
appended:Here's the build command again, with
-v
included: