Commit 312e7d50 by Jason Merrill Committed by Mike Stump

90th Cygnus<->FSF quick merge

From-SVN: r13612
parent 1b84b6f8
Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
* pt.c (tsubst): Put it back for -fno-ansi-overloading.
Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
smashes together template and non-template decls of the same
signature.
Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com> Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lookup_name_real): Also build a TYPENAME_TYPE for nested
classes.
* pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE. * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com> Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
......
// Implementation file for the -*- C++ -*- dynamic memory management header. // Implementation file for the -*- C++ -*- dynamic memory management header.
// Copyright (C) 1996 Free Software Foundation // Copyright (C) 1996 Free Software Foundation
// This file is part of GNU CC. // This file is part of GNU CC.
// GNU CC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
// GNU CC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with GNU CC; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
// As a special exception, if you link this library with other files,
// some of which are compiled with GCC, to produce an executable,
// this library does not by itself cause the resulting executable
// to be covered by the GNU General Public License.
// This exception does not however invalidate any other reasons why
// the executable file might be covered by the GNU General Public License.
#pragma implementation "new" #pragma implementation "new"
#include "new" #include "new"
......
...@@ -1483,7 +1483,7 @@ tsubst (t, args, nargs, in_decl) ...@@ -1483,7 +1483,7 @@ tsubst (t, args, nargs, in_decl)
/* We do NOT check for matching decls pushed separately at this /* We do NOT check for matching decls pushed separately at this
point, as they may not represent instantiations of this point, as they may not represent instantiations of this
template, and in any case are considered separate under the template, and in any case are considered separate under the
discrete model. */ discrete model. Instead, see add_maybe_template. */
r = copy_node (t); r = copy_node (t);
copy_lang_decl (r); copy_lang_decl (r);
...@@ -1542,7 +1542,7 @@ tsubst (t, args, nargs, in_decl) ...@@ -1542,7 +1542,7 @@ tsubst (t, args, nargs, in_decl)
grok_op_properties (r, DECL_VIRTUAL_P (r), DECL_FRIEND_P (r)); grok_op_properties (r, DECL_VIRTUAL_P (r), DECL_FRIEND_P (r));
/* Look for matching decls for the moment. */ /* Look for matching decls for the moment. */
if (! member) if (! member && ! flag_ansi_overloading)
{ {
tree decls = lookup_name_nonclass (DECL_NAME (t)); tree decls = lookup_name_nonclass (DECL_NAME (t));
tree d = NULL_TREE; tree d = NULL_TREE;
...@@ -2747,31 +2747,16 @@ unify (tparms, targs, ntparms, parm, arg, nsubsts, strict) ...@@ -2747,31 +2747,16 @@ unify (tparms, targs, ntparms, parm, arg, nsubsts, strict)
case TEMPLATE_CONST_PARM: case TEMPLATE_CONST_PARM:
(*nsubsts)++; (*nsubsts)++;
idx = TEMPLATE_CONST_IDX (parm); idx = TEMPLATE_CONST_IDX (parm);
if (targs[idx] == arg) if (targs[idx])
return 0;
else if (targs[idx])
{ {
tree t = targs[idx]; int i = cp_tree_equal (targs[idx], arg);
if (TREE_CODE (t) == TREE_CODE (arg)) if (i == 1)
switch (TREE_CODE (arg)) return 0;
{ else if (i == 0)
case INTEGER_CST: return 1;
if (tree_int_cst_equal (t, arg)) else
return 0; my_friendly_abort (42);
break;
case REAL_CST:
if (REAL_VALUES_EQUAL (TREE_REAL_CST (t), TREE_REAL_CST (arg)))
return 0;
break;
/* STRING_CST values are not valid template const parms. */
default:
;
}
/* else we get two different bindings, so deduction fails. */
return 1;
} }
/* else if (typeof arg != tparms[idx])
return 1;*/
targs[idx] = copy_to_permanent (arg); targs[idx] = copy_to_permanent (arg);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment