3 ms·
Indeed, C++ has benefited enormously from having multiple implementations. If one compiler produces results different from another, generally speaking, you've j
by Subsentient 5y ago
Indeed, C++ has benefited enormously from having multiple implementations. If one compiler produces results different from another, generally speaking, you've just found an issue in that compiler. The multiple implementations serves as checks and balances in a way.
- yakubin 5y agoTo be fair, off the top of my head, Clang and GCC: - lex differently; - have different baselines for what code even compiles: e.g. in GCC an out-of-range hex escape sequence in an integer character constant generates a warning; in Clang it generates an error. Additionally, for a long time on Windows MinGW's std::random_device()() always returned 0, being a real-world depiction of <https://xkcd.com/221/ https://xkcd.com/221/>. So you compiled for Linux with GCC and everything was fine; then you compiled for Windows with MinGW and silently something broke, which resulted in a suspiciously big number of hash collisions. Then again, those are illustrations of a poorly written standard, not of the idea of a standard, which has multiple implementations, being bad.