This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH]: Fix g++.pt/memtemp79.C
- To: gcc-patches at gcc dot gnu dot org
- Subject: [C++ PATCH]: Fix g++.pt/memtemp79.C
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Wed, 23 Feb 2000 17:25:58 +0000
- Organization: CodeSourcery, LLC
Hi,
Following Mark's approval, I've installed the attached patch
which removes some obsolete code and fixes a failure.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2000-02-18 Nathan Sidwell <sidwell@codesourcery.com>
* decl.c (decls_match): Remove obsolete static member nadgering.
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.545
diff -c -3 -p -r1.545 decl.c
*** decl.c 2000/02/16 23:54:22 1.545
--- decl.c 2000/02/18 10:45:26
*************** decls_match (newdecl, olddecl)
*** 2810,2837 ****
&& DECL_LANGUAGE (olddecl) == lang_c))
return 0;
- /* When we parse a static member function definition,
- we put together a FUNCTION_DECL which thinks its type
- is METHOD_TYPE. Change that to FUNCTION_TYPE, and
- proceed. */
- if (TREE_CODE (f1) == METHOD_TYPE && DECL_STATIC_FUNCTION_P (olddecl))
- revert_static_member_fn (&newdecl, &f1, &p1);
- else if (TREE_CODE (f2) == METHOD_TYPE
- && DECL_STATIC_FUNCTION_P (newdecl))
- revert_static_member_fn (&olddecl, &f2, &p2);
-
- /* Here we must take care of the case where new default
- parameters are specified. Also, warn if an old
- declaration becomes ambiguous because default
- parameters may cause the two to be ambiguous. */
if (TREE_CODE (f1) != TREE_CODE (f2))
! {
! if (TREE_CODE (f1) == OFFSET_TYPE)
! cp_compiler_error ("`%D' redeclared as member function", newdecl);
! else
! cp_compiler_error ("`%D' redeclared as non-member function", newdecl);
! return 0;
! }
if (same_type_p (TREE_TYPE (f1), TREE_TYPE (f2)))
{
--- 2810,2817 ----
&& DECL_LANGUAGE (olddecl) == lang_c))
return 0;
if (TREE_CODE (f1) != TREE_CODE (f2))
! return 0;
if (same_type_p (TREE_TYPE (f1), TREE_TYPE (f2)))
{
2000-02-18 Nathan Sidwell <sidwell@codesourcery.com>
* g++.old-deja/g++.pt/memtemp79.C: Fixed.
Index: g++.old-deja/g++.pt/memtemp79.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.pt/memtemp79.C,v
retrieving revision 1.2
diff -U3 -r1.2 memtemp79.C
--- memtemp79.C 1998/12/16 21:59:03 1.2
+++ memtemp79.C 2000/02/18 11:56:56
@@ -2,5 +2,5 @@
struct foo {
template<typename T> static void bar( foo* );
- template<typename T> void bar() const; // gets bogus error - quals XFAIL *-*-*
+ template<typename T> void bar() const; // gets bogus error - quals
};