summaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorgiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-02 01:07:08 +0000
committergiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-02 01:07:08 +0000
commit4b2889404bf7ad247694dbb60e9cd9c2b9ae6810 (patch)
tree41fab7747ae52718d59de077990287a61fb18289 /gcc/cp/pt.c
parent67d6c12b056383ab8afca1005dd69a9c26c41060 (diff)
downloadgcc-4b2889404bf7ad247694dbb60e9cd9c2b9ae6810.tar.gz
* pt.c (tsubst_qualified_id): Improved error message when a type
is expected but not found. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77089 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 53206776acd..633aa760b21 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7264,8 +7264,11 @@ tsubst_qualified_id (tree qualified_id, tree args,
? DECL_TEMPLATE_RESULT (expr) : expr) == TYPE_DECL)
{
if (complain & tf_error)
- error ("`%E' names a type, but a non-type is expected",
- qualified_id);
+ {
+ error ("dependent-name`%E' is parsed as a non-type, but "
+ "instantiation yields a type", qualified_id);
+ inform ("say `typename %E' if a type is meant", qualified_id);
+ }
return error_mark_node;
}
}