diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-12-20 04:59:42 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-12-20 04:59:42 +0000 |
commit | c3115fd2d9b8c820af8900b35e3aec3857a3c888 (patch) | |
tree | d038d188b73f2f5d5ab1322b5853d8d799e855b6 /gcc/cp | |
parent | 6b20b203a615aa0a301a006ec96531b1f23337a7 (diff) | |
download | gcc-c3115fd2d9b8c820af8900b35e3aec3857a3c888.tar.gz |
re PR c++/24278 (ICE while trying to print out error)
PR c++/24278
* init.c (expand_member_init): Print messages about baseclasses
using %T rather than %D.
PR c++/24278
* g++.dg/template/ctor5.C: New test.
From-SVN: r108840
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/init.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3c79990b6ce..2b3c175b9ab 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2005-12-19 Mark Mitchell <mark@codesourcery.com> + PR c++/24278 + * init.c (expand_member_init): Print messages about baseclasses + using %T rather than %D. + PR c++/24915 * class.c (add_method): Do not treat templates as identical unless their return types are the same. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index f43846719e5..f19842dddc1 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1019,11 +1019,11 @@ expand_member_init (tree name) if (!direct_binfo && !virtual_binfo) { if (CLASSTYPE_VBASECLASSES (current_class_type)) - error ("type %qD is not a direct or virtual base of %qT", - name, current_class_type); + error ("type %qT is not a direct or virtual base of %qT", + basetype, current_class_type); else - error ("type %qD is not a direct base of %qT", - name, current_class_type); + error ("type %qT is not a direct base of %qT", + basetype, current_class_type); return NULL_TREE; } |