summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-15 14:48:29 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-15 14:48:29 +0000
commita4ad28aa3166cad0dc1c86071acd9497ab0c1667 (patch)
tree2561c593f7768837b808e9a8736bf10674dbc17c /gcc/cp
parentb58808466ed2f081c03ec23fcbf11a39fb191e8a (diff)
downloadgcc-a4ad28aa3166cad0dc1c86071acd9497ab0c1667.tar.gz
cp:
PR c++/12184 * typeck.c (convert_arguments): Return error_mark_node for an incomplete parameter. Make error message more informative. testsuite: PR c++/12184 * g++.dg/expr/call2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c14
-rw-r--r--gcc/cp/typeck.c8
3 files changed, 20 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 374e7e57e66..815a5538bff 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/12184
+ * typeck.c (convert_arguments): Return error_mark_node for an
+ incomplete parameter. Make error message more informative.
+
2003-09-12 Mark Mitchell <mark@codesourcery.com>
PR c++/3907
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f829095a1e1..28ed0bcd232 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5254,12 +5254,14 @@ instantiate_class_template (tree type)
if (TYPE_LANG_SPECIFIC (tag) && CLASSTYPE_IS_TEMPLATE (tag))
/* Unfortunately, lookup_template_class sets
CLASSTYPE_IMPLICIT_INSTANTIATION for a partial
- instantiation (i.e., for the type of a member template
- class nested within a template class.) This behavior is
- required for maybe_process_partial_specialization to work
- correctly, but is not accurate in this case; the TAG is not
- an instantiation of anything. (The corresponding
- TEMPLATE_DECL is an instantiation, but the TYPE is not.) */
+ instantiation (i.e., for the type of a member
+ template class nested within a template class.)
+ This behavior is required for
+ maybe_process_partial_specialization to work
+ correctly, but is not accurate in this case;
+ the TAG is not an instantiation of anything.
+ (The corresponding TEMPLATE_DECL is an
+ instantiation, but the TYPE is not.) */
CLASSTYPE_USE_TEMPLATE (newtag) = 0;
/* Now, we call pushtag to put this NEWTAG into the scope of
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 32ec44b4679..8f1171f8ee1 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -2532,8 +2532,12 @@ convert_arguments (tree typelist, tree values, tree fndecl, int flags)
if (!COMPLETE_TYPE_P (complete_type (type)))
{
- error ("parameter type of called function is incomplete");
- parmval = val;
+ if (fndecl)
+ error ("parameter %P of `%D' has incomplete type `%T'",
+ i, fndecl, type);
+ else
+ error ("parameter %P has incomplete type `%T'", i, type);
+ parmval = error_mark_node;
}
else
{