gcc/testsuite/g++.dg/diagnostic/semicolon8.C
raw| 1 | // PR c++/113760 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-pedantic-errors" } |
| 4 | |
| 5 | struct S { |
| 6 | void f1 () {} |
| 7 | // A single semicolon is valid after a member function definition. |
| 8 | void f2 () {}; |
| 9 | void f3 () const; |
| 10 | }; |
| 11 | void S::f3 () const { }; // { dg-error "extra .;. outside of a function" "" { target c++98_only } } |