Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/method1.C

raw
1 // PR c++/44627
2 // { dg-do compile }
3
4 struct A
5 {
6 A *foo ();
7 };
8
9 template <class T>
10 void
11 bar ()
12 {
13 A::foo ().anything; // { dg-error "without object" }
14 }
15
16 void
17 baz ()
18 {
19 bar <int> ();
20 }