Well, 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.
Clang at least errors out here.
C++ is a mess.