| 1 |
// { dg-do assemble } |
| 2 |
// g++ 1.37.1 bug 900404_04 |
| 3 |
|
| 4 |
// [dcl.dcl] explains that simple-declarations may omit the |
| 5 |
// init-declarator-list only if the decl-specifier-seq declares a |
| 6 |
// class, i.e. if it contains a class-specifier, an |
| 7 |
// elaborated-type-specifier with class key, or an enum-specifier. The |
| 8 |
// declaration below contains neither. |
| 9 |
|
| 10 |
// Since C++11 this is allowed as an empty-declaration. |
| 11 |
|
| 12 |
// g++ fails to flag errors for such usage in C++98. |
| 13 |
|
| 14 |
// keywords: semicolon, vacuous, file scope, declaration |
| 15 |
|
| 16 |
int i; |
| 17 |
|
| 18 |
; // { dg-error "extra ';'" "" { target c++98_only } 0 } |
| 19 |
|
| 20 |
int main () { return 0; } |