diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-31 20:03:12 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-31 20:03:12 +0000 |
commit | c9e1b8d8e16c0c50fee1a4146f4d3ef6d3ea0b9a (patch) | |
tree | 9348fbb31f346a3db6c887391af06665ca26393d /gcc/cp/call.c | |
parent | 8c5f0319543f94f32a9606b720a0ba12cde20fa6 (diff) | |
download | ppe42-gcc-c9e1b8d8e16c0c50fee1a4146f4d3ef6d3ea0b9a.tar.gz ppe42-gcc-c9e1b8d8e16c0c50fee1a4146f4d3ef6d3ea0b9a.zip |
PR c++/27801
* call.c (perform_implicit_conversion): Do not actually perform
conversions in templates.
PR c++/26496
* call.c (resolve_args): Check for invalid uses of bound
non-static member functions.
* init.c (build_offset_ref): Return error_mark_node for errors.
PR c++/27385
* decl.c (reshape_init): Robustify.
(reshape_init_array_1): Likewise.
PR c++/27801
* g++.dg/template/cond6.C: New test.
PR c++/26496
* g++.dg/template/crash51.C: New test.
* g++.old-deja/g++.mike/net36.C: Tweak error markers.
PR c++/27385
* g++.dg/init/array20.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 9e69772954c..2167101e2f9 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -2704,6 +2704,8 @@ resolve_args (tree args) error ("invalid use of void expression"); return error_mark_node; } + else if (invalid_nonstatic_memfn_p (arg)) + return error_mark_node; } return args; } @@ -6388,6 +6390,14 @@ perform_implicit_conversion (tree type, tree expr) error ("could not convert %qE to %qT", expr, type); expr = error_mark_node; } + else if (processing_template_decl) + { + /* In a template, we are only concerned about determining the + type of non-dependent expressions, so we do not have to + perform the actual conversion. */ + if (TREE_TYPE (expr) != type) + expr = build_nop (type, expr); + } else expr = convert_like (conv, expr); |