summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/pmem.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/pmem.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.jason/pmem.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/pmem.C b/gcc/testsuite/g++.old-deja/g++.jason/pmem.C
new file mode 100755
index 0000000..76e8732
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/pmem.C
@@ -0,0 +1,11 @@
+// Bug: g++ parses the declaration of 'char A::* foo' below as a
+// declaration of 'char A'.
+// Build don't link:
+
+class A { };
+typedef int foo;
+void f ()
+{
+ char A::* foo;
+ foo = 0; // gets bogus error - parsing blunder
+}