aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.3/gcc/testsuite/g++.old-deja/g++.other/crash28.C
blob: c0f4bfa66e6c6de94fe03e49facb1c80aa2bd00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// { dg-do assemble  }
// Origin: Jakub Jelinek <jakub@redhat.com>

namespace N
{
  class X;
  template <class T>
  class Y
  {
  public:
    inline Y () {}
    inline operator const Y<X> & () const
    {
      return *reinterpret_cast<const Y<X> *>(this);
    }
  };
}
class bar
{
public:
  inline bar () {}
  inline bar (const ::N::Y< ::N::X>& a);
};

class foo
{
  bool b;
public:
  foo();
  void x () throw(bar);
};
void foo::x() throw(bar)
{
  if (!b) throw bar (static_cast<::N::X*>(this));	// { dg-error "lambda expressions|expected|invalid" } parse error
}