aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/const2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/const2.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/const2.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/const2.C b/gcc/testsuite/g++.old-deja/g++.jason/const2.C
new file mode 100644
index 00000000000..3aeae3c7e71
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/const2.C
@@ -0,0 +1,14 @@
+// Example of static member constants
+
+extern "C" int printf (const char *, ...);
+
+struct T {
+ static const char letter = 'a'; // this is the new stuff!
+ char x[letter];
+ void f();
+};
+
+void T::f() { printf ("%p", &letter); }
+const char T::letter; // still need def after class
+
+main() { }