Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/semicolon2.C

raw
1 // DR 1693, Superfluous semicolons in class definitions
2 // PR c++/113760
3 // { dg-do compile }
4 // { dg-options "-Wpedantic" }
5 // { dg-prune-output "only available with" }
6
7 struct X { ; }; // { dg-warning "extra .;. inside a struct" "" { target c++98_only } }
8
9 struct S {
10 void baz () = delete;
11 void qux () = delete;
12 ; // { dg-warning "extra .;. inside a struct" "" { target c++98_only } }
13 void corge () = delete;
14 ; // { dg-warning "extra .;. inside a struct" "" { target c++98_only } }
15 ; // { dg-warning "extra .;. inside a struct" "" { target c++98_only } }
16 int s;
17 ; // { dg-warning "extra .;. inside a struct" "" { target c++98_only } }
18 };