http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git] / gcc / testsuite / g++.dg / parse / crash37.C
blob8320dfaa50fb59e9416e67e15280c7733dfeb6eb
1 // PR c++/31941
2 // { dg-do compile }
4 struct S
6   S() throw () { }
7   virtual ~S () throw ();
8   virtual const char* what () const throw ();
9 };
11 const char *
12 foo (S &e)
14   return e.what ().c_str ();    // { dg-error "c_str.*S::what.*which is of non-class type" }