]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Thu, 27 Jun 2002 21:48:01 +0000 (21:48 +0000)
committerNo Author <no-author@gcc.gnu.org>
Thu, 27 Jun 2002 21:48:01 +0000 (21:48 +0000)
'gcc-3_1-branch'.

From-SVN: r55042

gcc/testsuite/g++.dg/template/friend7.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wunknownprag.c [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/template/friend7.C b/gcc/testsuite/g++.dg/template/friend7.C
new file mode 100644 (file)
index 0000000..a954f89
--- /dev/null
@@ -0,0 +1,33 @@
+// { dg-do compile }
+
+template <typename V>
+struct b
+{
+  template <typename T>
+  class a
+  {
+    template <typename>
+    friend class a;
+
+    T t_;
+
+   public:
+    a() {}
+    a(a<T *> const &);
+  };
+};
+
+template <typename V>
+template <typename T>
+b<V>::a<T>::a(a<T *> const &rhs): t_(*rhs.t_)
+{}
+
+
+int
+f ()
+{
+  b<void *>::a<char *> q;
+  b<void *>::a<char> w(q);
+
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/Wunknownprag.c b/gcc/testsuite/gcc.dg/Wunknownprag.c
new file mode 100644 (file)
index 0000000..c5ba58f
--- /dev/null
@@ -0,0 +1,11 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.  */
+
+/* { dg-do compile } */
+/* { dg-options "-Wunknown-pragmas" } */
+
+/* We used to get "unspellable token: CPP_EOF" warnings.  */
+
+#pragma                                /* { dg-warning "ignoring #pragma" } */
+#pragma ~                      /* { dg-warning "ignoring #pragma" } */
+#pragma baz                    /* { dg-warning "ignoring #pragma" } */
+#pragma baz baz                        /* { dg-warning "ignoring #pragma" } */