This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,committed] Add a testcase for fixed PR7983
- From: Kriang Lerdsuwanakij <lerdsuwa at users dot sourceforge dot net>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 1 Aug 2003 22:49:46 +0700 (ICT)
- Subject: [PATCH,committed] Add a testcase for fixed PR7983
- Reply-to: <lerdsuwa at users dot sourceforge dot net>
Hi
This is just a testcase for PR7983 that is fixed
as a by-product of my xref_tag reorganization (PR8442, 8806).
Committed to trunk as obvious.
--Kriang
2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7983
* g++.dg/parse/typedef4.C: New test.
diff -cprN gcc-main-save/gcc/testsuite/g++.dg/parse/typedef4.C gcc-main-new/gcc/testsuite/g++.dg/parse/typedef4.C
*** gcc-main-save/gcc/testsuite/g++.dg/parse/typedef4.C Thu Jan 1 07:00:00 1970
--- gcc-main-new/gcc/testsuite/g++.dg/parse/typedef4.C Fri Aug 1 22:35:34 2003
***************
*** 0 ****
--- 1,12 ----
+ // { dg-do compile }
+
+ // Origin: Matt Austern <austern@apple.com>
+
+ // PR c++/7983: ICE typedef to typename as friend.
+
+ template<class T> class smart_ptr2 {
+ T* real_ptr;
+ public:
+ typedef typename T::subT td;
+ friend class td; // { dg-error "typename|not name a class" }
+ };