1// { dg-do assemble } 2// 3// Copyright (C) 1999 Free Software Foundation, Inc. 4// Contributed by Nathan Sidwell 6 Jun 1999 <nathan@acm.org> 5 6// We cannot catch an incomplete type, or ptr to one 7 8struct A; // { dg-message "" } forward decl 9 10void fn() 11{ 12 try {} 13 catch (A *p) {} // { dg-error "" } undefined type 14 try {} 15 catch (A p) {} // { dg-error "" } undefined type 16 try {} 17 catch (void const *p) {} // ok 18} 19