gcc/testsuite/g++.dg/diagnostic/semicolon12.C
raw| 1 | // DR 569, Spurious semicolons at namespace scope should be allowed |
| 2 | // PR c++/113760 |
| 3 | // { dg-options "" } |
| 4 | |
| 5 | // C++11 allows extra semicolons at namespace scope. |
| 6 | struct S { |
| 7 | void foo(); |
| 8 | }; |
| 9 | ; |
| 10 | |
| 11 | void S::foo () { |
| 12 | }; |
| 13 | ; |
| 14 | |
| 15 | namespace N { |
| 16 | }; |
| 17 | ; |
| 18 | |
| 19 | void f(); |
| 20 | ; |
| 21 | |
| 22 | void |
| 23 | f () |
| 24 | { |
| 25 | }; |
| 26 | ; |
| 27 | |
| 28 | int x; |
| 29 | ; |