]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.law/init1.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / init1.C
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init1.C b/gcc/testsuite/g++.old-deja/g++.law/init1.C
deleted file mode 100644 (file)
index 1f23d78..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Build don't link: 
-// GROUPS passed initialization
-class foo {
-public:
-  int data;
-  foo(int dat) { data = dat; }
-};
-
-class bar {
-public:
-  foo f[3] = { 1, 2, 3 };   // works: f[0] = 1, f[1] = 2, f[2] = 3 // ERROR - ANSI C++ forbids initialization of member f;
-};
-
-class bar2 {
-public:
-      foo f[3] = { foo(1), foo(2), foo(3) }; // ERROR - ANSI C++ forbids initialization of member f;
-  // does not compile -- error: field initializer is not constant
-};
-
-int main(void)
-{
-  foo f[3] = { foo(1), foo(2), foo(3) };
-  // standard C++ ... and it works too! :)
-  return 0;
-}