3 ms·
Ran the program with some slight modifications and couldn't reproduce it #include <iostream> #include <sstream> int main(int c, char **v) { std
by kevinchen 11y ago
Ran the program with some slight modifications and couldn't reproduce it
#include <iostream>
#include <sstream>
int main(int c, char **v) {
std::stringstream s("1.5");
double x; s >> x;
return x == 1.5 ? 0 : 1;
}
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Thread model: posix
- jevinskie 11y agoI'd be wary of concluding that "if it works on Apple Clang, it will work on all Clangs". I've seen this to be untrue in multiple cases and the root cause can be found in a multitude of locations. LLVM, Clang, libc (glibc, musl, MSVC, Apple libC,), C++ STL (libstdc++, libc++, MSVC), compiler-rt, platform ABI (Apple ABI's are pretty much SysV, except when they aren't...), and of course the actual version/branch of all of these things. It is certainly a start but unfortunately an over-generalization. :)
- Narishma 11y agoJust tried it with clang 3.6 on Linux and couldn't reproduce it either.
- onedognight 11y agoThe bug is only in x86_64 Clang 3.6 for Android (r10e).