Debian Codegraph @

gcc/testsuite/g++.dg/warn/pr101219.C

raw
1 /* PR c++/101219 - ICE on use of uninitialized memfun pointer
2 { dg-do compile }
3 { dg-options "-Wall" } */
4
5 struct S { void m(); };
6
7 template <int> bool f() {
8 void (S::*mp)();
9
10 /* The expression below isn't type-dependent so also verify
11 it's diagnosed even though the template isn't instantiated. */
12 return &S::m == mp; // { dg-warning "\\\[-Waddress" }
13 }