3 ms·
Yet GCC will still apparently let you call this function without as much as a warning. This should be one of the easiest mistakes to find statically. Clang at
by mmaniac 2y ago
Yet GCC will still apparently let you call this function without as much as a warning. This should be one of the easiest mistakes to find statically.
Clang at least errors out here.
C++ is a mess.
- bregma 2y agoWell, if the designer of the class used the right annotations GCC will issue a warning if warnings are enabled. This is third-party code and nothing to do with GCC per se and the language itself does not require any kind of compile-time warning for undefined behaviour. Then again, most people seem to disable or ignore the warnings the toolchain gives them. You can make anything idiot-proof but there's always a bigger idiot. It sounds more like a crappy library designed by people who don't know their craft. It's easier to blame the tools.