[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / eh / spec2.C
blob2cca82a227fee8597536f090cf0803a0a065c88a
1 // { dg-do compile }
3 struct S { void f (void); };
5 typedef void f1 (void) throw (int); // { dg-error "exception" "" { target c++14_down } }
6                                     // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
7                                     // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-2 }
8 typedef void (*f2) (void) throw (int); // { dg-error "exception" "" { target c++14_down } }
9                                        // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
10                                        // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-2 }
11 typedef void (S::*f3) (void) throw (int); // { dg-error "exception" "" { target c++14_down } }
12                                           // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
13                                           // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-2 }
14 void (*f4) (void) throw (int); // { dg-error "dynamic exception specification" "" { target c++17 } }
15                                // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-1 }
16 void (S::*f5) (void) throw (int); // { dg-error "dynamic exception specification" "" { target c++17 } }
17                                   // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-1 }