OSDN Git Service

PR c++/26291
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / parse / comma2.C
1 // { dg-do compile }
2
3 // Copyright (C) 2005 Free Software Foundation, Inc.
4
5 // PR c++/24907 [3.4/4.0/4.1/4.2 Regression] "int x, ;" accepted
6
7 int x;
8 int y,; /* { dg-error "expected" } */
9
10 int main()
11 {
12   int a;
13   int b,;    /* { dg-error "expected" } */
14   int c,d;
15   int e,f,;  /* { dg-error "expected" } */
16   int g,h,i;
17   int j,k,l,;/* { dg-error "expected" } */
18   int m,,,n; /* { dg-error "expected" } */
19 }