2 // Copyright (C) 1999 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 21 Nov 1999 <nathan@acm.org>
5 // make sure we don't call base dtors, if we failed to call the
6 // base ctor due to exception throwing
10 static bool bad = false;
14 printf ("in %s\n", __PRETTY_FUNCTION__);
22 #if __cplusplus <= 201402L
23 throw (int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
30 #if __cplusplus <= 201402L
31 throw (int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
33 {printf ("in ctor X %s\n", __PRETTY_FUNCTION__); bad = true;}
35 {printf ("in dtor X %s\n", __PRETTY_FUNCTION__); bad = true;}
41 #if __cplusplus <= 201402L
42 throw (int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
48 #if __cplusplus <= 201402L
49 throw (int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
51 : X(thrower ()) // throws, so X::X is never called
52 {printf ("in ctor Y%s\n", __PRETTY_FUNCTION__); bad = true;}
54 {printf ("in dtor Y%s\n", __PRETTY_FUNCTION__); bad = true;}