diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/const2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/const2.C | 15 |
1 files changed, 15 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 000000000..b6aa6d4a7 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/const2.C @@ -0,0 +1,15 @@ +// { dg-do run } +// 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 + +int main() { } |