2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ext / array4.C
blobf0a90d8422d721dd1afbd7355ae58ee02ed950b2
1 // { dg-do assemble  }
2 // { dg-options "" }
5 // Copyright (C) 2000 Free Software Foundation, Inc.
6 // Contributed by Mark Mitchell 19 Mar 2000 <mark@codesourcery.com>
7 //                Nathan Sidwell 19 Mar 2000 <nathan@codesourcery.com>
9 // [nathan] We have a zero sized array extension, and (unfortunately) allow it
10 // to be the sole member of a struct (rather than the trailing member of a
11 // non-empty struct as C99 is/will allow). Such a type will have a size of
12 // zero, but is not incomplete.
14 struct A
16   int m[0];
19 void foo ()
21   A a;
24 template <class T>
25 struct S
27   int x[0];
30 template struct S<int>;