diff options
author | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-05-31 21:24:31 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-05-31 21:24:31 +0000 |
commit | c8b2e872a83dd3869ffc4443201a1f3096bc3a6c (patch) | |
tree | 5e0812c5ac7d5a81ea49d40fed31c165f91fb9df /gcc/cp/cvt.c | |
parent | 7c9fee34e5688d79d96db0e2b2e56d7273cb4335 (diff) | |
download | gcc-c8b2e872a83dd3869ffc4443201a1f3096bc3a6c.tar.gz |
re PR c++/15742 ('noreturn' attribute ignored in method of template functions.)
PR c++/15742
* call.c (build_over_call): Set
current_function_returns_abnormally even in template functions.
PR c++/15696
* cp-tree.h (invalid_nonstatic_memfn_p): New function.
* cvt.c (convert_to_void): Use it.
* typeck.c (invalid_nonstatic_memfn_p): New function.
(decay_conversion): Use it.
PR c++/15625
* pt.c (tsubst_decl): Set DECL_FRIEND_CONTEXT for instantiated
templates.
PR c++/15629
* name-lookup.c (arg_assoc_class): Do not find template
specializations.
PR c++/15209
* tree.c (lvalue_p_1): Only consider the right-hand side of "."
expressions when determining whether or not an express is packed.
PR c++/15742
* g++.dg/warn/Wreturn-1.C: New test.
PR c++/15696
* g++.dg/expr/ptrmem5.C: New test.
PR c++/15625
* g++.dg/template/friend27.C: New test.
PR c++/15629
* g++.dg/template/friend28.C: New test.
* g++.dg/template/friend.C: Do not depend on <iostream>. Add
error message.
PR c++/15209
* g++.dg/ext/packed3.C: Remove bogus error.
* g++.dg/ext/packed4.C: Remove bogus check.
* g++.dg/ext/packed6.C: New test.
From-SVN: r82499
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r-- | gcc/cp/cvt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index b22948106b2..61e179ed1b6 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -784,6 +784,8 @@ convert_to_void (tree expr, const char *implicit) return error_mark_node; if (!TREE_TYPE (expr)) return expr; + if (invalid_nonstatic_memfn_p (expr)) + return error_mark_node; if (VOID_TYPE_P (TREE_TYPE (expr))) return expr; switch (TREE_CODE (expr)) |