[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-09-06 Thread jason at gcc dot gnu dot org


--- Comment #4 from jason at gcc dot gnu dot org  2006-09-06 18:47 ---
This is also complicated by PR 16269; we don't manage the lifetime of
temporaries, so we don't know whether an initialized temporary is used again.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371



[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-09-06 Thread jason at gcc dot gnu dot org


--- Comment #5 from jason at gcc dot gnu dot org  2006-09-07 01:13 ---
Subject: Bug 27371

Author: jason
Date: Thu Sep  7 01:12:00 2006
New Revision: 116737

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=116737
Log:
PR c++/27371
* tree-inline.c (copy_result_decl_to_var): New fn.
(declare_return_variable): Use it.  Call declare_inline_vars here.
(expand_call_inline): Not here.
* cp/cvt.c (convert_to_void): Strip useless TARGET_EXPR.
* cp/cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
* cp/tree.c (build_cplus_new): Set it.

Added:
trunk/gcc/testsuite/g++.dg/warn/unused-result1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/cvt.c
trunk/gcc/cp/tree.c
trunk/gcc/tree-inline.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371



[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-09-05 Thread jason at gcc dot gnu dot org


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-05-04 14:47:45 |2006-09-06 05:49:06
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371



[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-09-05 Thread jason at gcc dot gnu dot org


--- Comment #3 from jason at gcc dot gnu dot org  2006-09-06 05:59 ---
This worked in 4.0 by accident, because of the NRV implementation I had in that
release which pushed aggregate return values into the argument list of a call. 
This had some problems, so I later changed it to use a MODIFY_EXPR, which
properly expresses what's going on, but interferes with this warning.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371



[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-05-24 Thread mmitchel at gcc dot gnu dot org


--- Comment #2 from mmitchel at gcc dot gnu dot org  2006-05-25 02:34 
---
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.1.1   |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371



[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-05-14 Thread mmitchel at gcc dot gnu dot org


-- 

mmitchel at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371



[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-05-04 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2006-05-04 14:47 ---
Confirmed.  The problem is that the C++ frontend emits

 unused_tmp = toLocal8Bit();

for the call.  At least it has DECL_IGNORED set, so maybe I have a patch for
this.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-05-04 14:47:45
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371



[Bug c++/27371] [4.1/4.2 Regression] Does not warn about unused function result (__attribute__((warn_unused_result)))

2006-05-02 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.1.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27371