This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16169] -Weffc++ item 15 improvements
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2004 19:33:39 -0000
- Subject: [Bug c++/16169] -Weffc++ item 15 improvements
- References: <20040624022151.16169.bkoz@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-06-28 19:33 -------
Confirmed:
-----------------
struct A {
A & foo() { return *this; };
A & operator = (const A&) { return foo(); };
};
-----------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -Weffc++ -c x.cc
x.cc: In member function `A& A::operator=(const A&)':
x.cc:3: warning: `operator=' should return a reference to `*this'
This enhancement is rather hard to do, though, since we need to
track variable values across inlining boundaries.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-06-28 19:33:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16169