aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.eh/catch1.C
blob: 7aa70ac97b30df6901fc5c92ef211c4d610b2e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do assemble  }
// 
// Copyright (C) 1999 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 Jun 1999 <nathan@acm.org>

// We cannot catch an incomplete type, or ptr to one

struct A; // { dg-error "" } forward decl

void fn()
{
  try {}
  catch (A *p) {} // { dg-error "" } undefined type
  try {}
  catch (A p) {}  // { dg-error "" } undefined type
  try {}
  catch (void const *p) {}  // ok
}