diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C b/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C new file mode 100644 index 000000000..04ff66905 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900404_04.C @@ -0,0 +1,18 @@ +// { dg-do assemble } +// g++ 1.37.1 bug 900404_04 + +// [dcl.dcl] explains that simple-declarations may omit the +// init-declarator-list only if the decl-specifier-seq declares a +// class, i.e. if it contains a class-specifier, an +// elaborated-type-specifier with class key, or an enum-specifier. The +// declaration below contains neither. + +// g++ fails to flag errors for such usage. + +// keywords: semicolon, vacuous, file scope, declaration + +int i; + +; // { dg-error "extra ';'" } + +int main () { return 0; } |