https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Target|x86_64-apple-darwin14.4.0 | Status|UNCONFIRMED |NEW Last reconfirmed| |2018-05-03 Ever confirmed|0 |1 --- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: struct RE { virtual void rp()=0; void ax(){rp();} }; struct BLKC { virtual void rb(){} }; template <typename T> struct LK : BLKC { T* p = nullptr; void rb() override { p->ax();} }; template <typename> struct AN : RE { void rp() override {} }; template <const char*> struct LR { virtual ~LR(){} struct LLC { virtual ~LLC(){} }; LK<AN<LLC>> l; }; constexpr char ET[]=""; struct I { LR<ET> _e; }; int main(){new I();} $ g++ -Wall 67650.cc -O1 -fdevirtualize 67650.cc:22:8: warning: ‘void AN< <template-parameter-1-1> >::rp() [with <template-parameter-1-1> = LR<(& ET)>::LLC]’ declared ‘static’ but never defined [-Wunused-function] void rp() override {} ^~