aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2001-04-25 08:31:19 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2001-04-25 08:31:19 +0000
commit6bda7a5e41bfca06a2cfdabbeb1c49948c8ab9eb (patch)
treeef721534e660501653ea55caa7abccbc52394844 /gcc/testsuite
parent12da8316cc54ad403a1c9dc5cd236c3f34727cd5 (diff)
downloadgcc-6bda7a5e41bfca06a2cfdabbeb1c49948c8ab9eb.zip
gcc-6bda7a5e41bfca06a2cfdabbeb1c49948c8ab9eb.tar.gz
gcc-6bda7a5e41bfca06a2cfdabbeb1c49948c8ab9eb.tar.bz2
decl.c (grokdeclarator): Set context of namespace scope TYPE_DECLS.
cp: * decl.c (grokdeclarator): Set context of namespace scope TYPE_DECLS. testsuite: * g++.old-deja/g++.ns/type2.C: New test. From-SVN: r41533
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/type2.C19
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 39abc4e..a0f0f25 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.ns/type2.C: New test.
+
2001-04-24 Zack Weinberg <zackw@stanford.edu>
* g++.old-deja/g++.other/perf1.C: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/type2.C b/gcc/testsuite/g++.old-deja/g++.ns/type2.C
new file mode 100644
index 0000000..d8407b1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.ns/type2.C
@@ -0,0 +1,19 @@
+// Build don't link:
+//
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 11 April 2001 <nathan@codesourcery.com>
+// Origin:stephen.webb@cybersafe.com
+
+// Bug 2125. TYPE_DECLS never had their DECL_CONTEXT set, which
+// confused forward references to classes.
+
+typedef void T;
+namespace A {
+ class C;
+ typedef class C C;
+ typedef int T;
+ class C
+ {
+ T i; // got bogus error, found wrong T
+ };
+}