diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-10-19 22:45:58 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-10-19 22:45:58 +0000 |
commit | c3c1f2b7bdce26985fd0e5aa4cefb59e6e0e3150 (patch) | |
tree | a02fd41d6c61be0f14c97b3b7e62f955d2f52009 /gcc/cp | |
parent | 875bcfdbf412ba625cf9ee9e1bd6610c0ad5b5f8 (diff) | |
download | gcc-c3c1f2b7bdce26985fd0e5aa4cefb59e6e0e3150.zip gcc-c3c1f2b7bdce26985fd0e5aa4cefb59e6e0e3150.tar.gz gcc-c3c1f2b7bdce26985fd0e5aa4cefb59e6e0e3150.tar.bz2 |
re PR c++/13657 (Error message incorrectly describes return type as argument type)
/cp
2011-10-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/13657
* class.c (instantiate_type): Fix error message.
/testsuite
2011-10-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/13657
* g++.dg/parse/error42.C: New.
* g++.old-deja/g++.other/ptrmem7.C: Tweak dg-errors.
From-SVN: r180228
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/class.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8e9bb4a..a32a7b9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-10-19 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/13657 + * class.c (instantiate_type): Fix error message. + 2011-10-19 Jason Merrill <jason@redhat.com> PR c++/50793 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index c8efc7e..ee6ca04 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -6867,8 +6867,8 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags) else { if (flags & tf_error) - error ("argument of type %qT does not match %qT", - TREE_TYPE (rhs), lhstype); + error ("cannot convert %qE from type %qT to type %qT", + rhs, TREE_TYPE (rhs), lhstype); return error_mark_node; } } |