2 ms·
That's not true, as mrustc proves. The C and C++ specs are incredibly ambiguous and frankly I don't know if they add that much value over good documentation.
by pcwalton 7y ago
That's not true, as mrustc proves. The C and C++ specs are incredibly ambiguous and frankly I don't know if they add that much value over good documentation.
- comex 7y agoWhen it comes to high-level stuff especially in C++, like the exact rules for template deduction, I think the specs are reasonably clear and do add value. But for the low-level memory model and undefined behavior, the specs are indeed extremely ambiguous. In fact, they're often outright 'wrong', in the sense that they have too little undefined behavior to support common compiler optimizations (e.g. [1] [2])... while making other things undefined for no benefit [3]. [1] https://fzn.fr/readings/c11comp.pdf https://fzn.fr/readings/c11comp.pdf [2] https://www.cs.utah.edu/~regehr/oopsla18.pdf https://www.cs.utah.edu/~regehr/oopsla18.pdf [3] https://www.imperialviolet.org/2016/06/26/nonnull.html https://www.imperialviolet.org/2016/06/26/nonnull.html