aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-09-18 17:26:05 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-09-18 17:26:05 +0000
commitb22b0e85d065009ed92a15abae45387917df927b (patch)
tree2fb2eea0385dcbfccd11993b70fa58b47e4651d7
parentef6c86589d1d474c59c895215916d34b93ec3bab (diff)
class.c (resolve_address_of_overloaded_function): Replace complain parameter with flags parameter.
* class.c (resolve_address_of_overloaded_function): Replace complain parameter with flags parameter. (instantiate_type): Adjust accordingly. From-SVN: r71529
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/class.c22
2 files changed, 18 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 60d889d46b4..a7492bce4aa 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-18 Mark Mitchell <mark@codesourcery.com>
+
+ * class.c (resolve_address_of_overloaded_function): Replace
+ complain parameter with flags parameter.
+ (instantiate_type): Adjust accordingly.
+
2003-09-17 Mark Mitchell <mark@codesourcery.com>
PR c++/11991
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 0ed3c01ebaa..78ab668f8df 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -127,8 +127,9 @@ static int field_decl_cmp PARAMS ((const tree *, const tree *));
static int method_name_cmp PARAMS ((const tree *, const tree *));
static void add_implicitly_declared_members PARAMS ((tree, int, int, int));
static tree fixed_type_or_null PARAMS ((tree, int *, int *));
-static tree resolve_address_of_overloaded_function PARAMS ((tree, tree, int,
- int, int, tree));
+static tree resolve_address_of_overloaded_function PARAMS ((tree, tree,
+ tsubst_flags_t,
+ int, int, tree));
static tree build_vtable_entry_ref PARAMS ((tree, tree, tree));
static tree build_vtbl_ref_1 PARAMS ((tree, tree));
static tree build_vtbl_initializer PARAMS ((tree, tree, tree, tree, int *));
@@ -6003,13 +6004,13 @@ pop_lang_context ()
static tree
resolve_address_of_overloaded_function (target_type,
overload,
- complain,
+ flags,
ptrmem,
template_only,
explicit_targs)
tree target_type;
tree overload;
- int complain;
+ tsubst_flags_t flags;
int ptrmem;
int template_only;
tree explicit_targs;
@@ -6073,7 +6074,7 @@ resolve_address_of_overloaded_function (target_type,
}
else
{
- if (complain)
+ if (flags & tf_error)
error ("\
cannot resolve overloaded function `%D' based on conversion to type `%T'",
DECL_NAME (OVL_FUNCTION (overload)), target_type);
@@ -6193,7 +6194,7 @@ cannot resolve overloaded function `%D' based on conversion to type `%T'",
if (matches == NULL_TREE)
{
/* There were *no* matches. */
- if (complain)
+ if (flags & tf_error)
{
error ("no matches converting function `%D' to type `%#T'",
DECL_NAME (OVL_FUNCTION (overload)),
@@ -6214,7 +6215,7 @@ cannot resolve overloaded function `%D' based on conversion to type `%T'",
{
/* There were too many matches. */
- if (complain)
+ if (flags & tf_error)
{
tree match;
@@ -6241,7 +6242,7 @@ cannot resolve overloaded function `%D' based on conversion to type `%T'",
{
static int explained;
- if (!complain)
+ if (!(flags & tf_error))
return error_mark_node;
pedwarn ("assuming pointer to member `%D'", fn);
@@ -6287,6 +6288,7 @@ instantiate_type (lhstype, rhs, flags)
tree lhstype, rhs;
tsubst_flags_t flags;
{
+ tsubst_flags_t flags_in = flags;
int complain = (flags & tf_error);
int strict = (flags & tf_no_attributes)
? COMPARE_NO_ATTRIBUTES : COMPARE_STRICT;
@@ -6377,7 +6379,7 @@ instantiate_type (lhstype, rhs, flags)
return
resolve_address_of_overloaded_function (lhstype,
fns,
- complain,
+ flags_in,
allow_ptrmem,
/*template_only=*/1,
args);
@@ -6387,7 +6389,7 @@ instantiate_type (lhstype, rhs, flags)
return
resolve_address_of_overloaded_function (lhstype,
rhs,
- complain,
+ flags_in,
allow_ptrmem,
/*template_only=*/0,
/*explicit_targs=*/NULL_TREE);