From 5de1a1eb07a702a1a79395f0d956b1bba469138e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 7 Sep 2006 18:47:34 -0400 Subject: [PATCH] re PR c++/27371 (Does not warn about unused function result (__attribute__((warn_unused_result)))) PR c++/27371 * cvt.c (convert_to_void): Enable previous change. From-SVN: r116765 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/cvt.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 06e5fec236f..54674644862 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2006-09-07 Jason Merrill + PR c++/27371 + * cvt.c (convert_to_void): Enable previous change. + PR c++/26957 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied parms. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 52b5be46eeb..fea5768f8ae 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -897,7 +897,7 @@ convert_to_void (tree expr, const char *implicit) we don't use it and don't need to destroy it. We'll still allocate space for it in expand_call or declare_return_variable, but we don't need to track it through all the tree phases. */ - if (0 && TARGET_EXPR_IMPLICIT_P (expr) + if (TARGET_EXPR_IMPLICIT_P (expr) && TYPE_HAS_TRIVIAL_DESTRUCTOR (TREE_TYPE (expr))) { tree init = TARGET_EXPR_INITIAL (expr);