https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64877
--- Comment #3 from Tom Tromey <tromey at gcc dot gnu.org> --- Oops, had the wrong gcc in $PATH. That test case does warn: pokyo. g++ -std=c++11 -c -Wall -Waddress -O2 x.cc x.cc: In instantiation of ‘S<Derived>::S() [with Derived = T]’: x.cc:19:8: required from here x.cc:9:29: warning: the address of ‘void S<Derived>::Unwrap() [with Derived = T]’ will never be NULL [-Waddress] if (&S<Derived>::Unwrap != &Derived::Unwrap) ^ I think I would expect a warning on the second assert, but not the first.