aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/call.c2
-rw-r--r--gcc/cp/cp-lang.c2
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/decl.c4
-rw-r--r--gcc/cp/decl2.c2
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/typeck.c6
-rw-r--r--gcc/cp/typeck2.c4
9 files changed, 26 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c5c097d..a9b6023 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,16 @@
+2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * call.c (build_new_method_call): Update.
+ * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
+ * cp-tree.h (cxx_incomplete_type_error): New.
+ * decl.c (grokdeclarator, grokparms): Update.
+ * decl2.c (check_classfn): Update.
+ * pt.c (tsubst): Update.
+ * typeck.c (complete_type_or_else, expr_sizeof,
+ decay_conversion): Update.
+ * typeck2.c (incomplete_type_error): Rename.
+ (add_exception_specifier): Update.
+
2002-04-18 Jason Merrill <jason@redhat.com>
PR c++/5658
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 12832cb..f9ca9a0 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4636,7 +4636,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
if (flags & LOOKUP_SPECULATIVELY)
return NULL_TREE;
if (!COMPLETE_TYPE_P (basetype))
- incomplete_type_error (instance_ptr, basetype);
+ cxx_incomplete_type_error (instance_ptr, basetype);
else
error ("no matching function for call to `%T::%D(%A)%#V'",
basetype, pretty_name, user_args,
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 0292719..1ac3122 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -134,6 +134,8 @@ static bool cxx_warn_unused_global_decl PARAMS ((tree));
#define LANG_HOOKS_UNSIGNED_TYPE c_common_unsigned_type
#undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE
#define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE c_common_signed_or_unsigned_type
+#undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR
+#define LANG_HOOKS_INCOMPLETE_TYPE_ERROR cxx_incomplete_type_error
/* Each front end provides its own hooks, for toplev.c. */
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 1cd7d4a..41bde38 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4373,6 +4373,7 @@ extern tree check_return_expr PARAMS ((tree));
build_binary_op(code, arg1, arg2, 1)
/* in typeck2.c */
+extern void cxx_incomplete_type_error PARAMS ((tree, tree));
extern tree error_not_base_type PARAMS ((tree, tree));
extern tree binfo_or_else PARAMS ((tree, tree));
extern void readonly_error PARAMS ((tree, const char *, int));
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 04c9799..51efa35 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11115,7 +11115,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
}
else
{
- incomplete_type_error (NULL_TREE, ctype);
+ cxx_incomplete_type_error (NULL_TREE, ctype);
return error_mark_node;
}
@@ -12136,7 +12136,7 @@ grokparms (first_parm)
&& !DECL_NAME (decl) && !result && !chain && !ellipsis)
/* this is a parmlist of `(void)', which is ok. */
break;
- incomplete_type_error (decl, type);
+ cxx_incomplete_type_error (decl, type);
/* It's not a good idea to actually create parameters of
type `void'; other parts of the compiler assume that a
void type terminates the parameter list. */
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 1b4daa1..a904c0d 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1353,7 +1353,7 @@ check_classfn (ctype, function)
{
methods = 0;
if (!COMPLETE_TYPE_P (ctype))
- incomplete_type_error (function, ctype);
+ cxx_incomplete_type_error (function, ctype);
else
error ("no `%#D' member function declared in class `%T'",
function, ctype);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 30a6ddb..aa198a6 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6810,7 +6810,7 @@ tsubst (t, args, complain, in_decl)
if (!COMPLETE_TYPE_P (ctx))
{
if (complain & tf_error)
- incomplete_type_error (NULL_TREE, ctx);
+ cxx_incomplete_type_error (NULL_TREE, ctx);
return error_mark_node;
}
}
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 060097ab..a928135 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -171,7 +171,7 @@ complete_type_or_else (type, value)
return NULL_TREE;
else if (!COMPLETE_TYPE_P (type))
{
- incomplete_type_error (value, type);
+ cxx_incomplete_type_error (value, type);
return NULL_TREE;
}
else
@@ -1566,7 +1566,7 @@ expr_sizeof (e)
}
else if (type_unknown_p (e))
{
- incomplete_type_error (e, TREE_TYPE (e));
+ cxx_incomplete_type_error (e, TREE_TYPE (e));
return c_sizeof (char_type_node);
}
/* It's illegal to say `sizeof (X::i)' for `i' a non-static data
@@ -1648,7 +1648,7 @@ decay_conversion (exp)
if (type_unknown_p (exp))
{
- incomplete_type_error (exp, TREE_TYPE (exp));
+ cxx_incomplete_type_error (exp, TREE_TYPE (exp));
return error_mark_node;
}
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index d7ac3d7..38daa08 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -185,7 +185,7 @@ abstract_virtuals_error (decl, type)
and TYPE is the type that was invalid. */
void
-incomplete_type_error (value, type)
+cxx_incomplete_type_error (value, type)
tree value;
tree type;
{
@@ -1326,7 +1326,7 @@ add_exception_specifier (list, spec, complain)
}
}
else if (complain)
- incomplete_type_error (NULL_TREE, core);
+ cxx_incomplete_type_error (NULL_TREE, core);
return list;
}