]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Wed, 8 Dec 2004 10:53:29 +0000 (10:53 +0000)
committerNo Author <no-author@gcc.gnu.org>
Wed, 8 Dec 2004 10:53:29 +0000 (10:53 +0000)
'gcc-3_4-branch'.

From-SVN: r91868

gcc/testsuite/g++.dg/lookup/name-clash4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/operator5.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/lookup/name-clash4.C b/gcc/testsuite/g++.dg/lookup/name-clash4.C
new file mode 100644 (file)
index 0000000..d4ff551
--- /dev/null
@@ -0,0 +1,12 @@
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
+
+// PR c++/18100: Invalid nested type.
+
+struct A
+{
+    template<int> struct A {}; // { dg-error "same name" }
+};
+
+A::A<0> a;                     // { dg-error "not a template" }
diff --git a/gcc/testsuite/g++.dg/template/operator5.C b/gcc/testsuite/g++.dg/template/operator5.C
new file mode 100644 (file)
index 0000000..1c0c292
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 7 Dec 2004 <nathan@codesourcery.com>
+
+// PR 18803: reject legal
+// Origin: Wolfgang Bangerth <bangerth@dealii.org>
+
+struct A { 
+  int operator() (); 
+}; 
+template <int> void foo () { 
+  A &a = *new A(); 
+  const int i = a(); 
+}