[Bug c++/77984] Invalid warning on templated operator= with -Weffc++

2018-02-13 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77984

David Malcolm  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||dmalcolm at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #7 from David Malcolm  ---
Looks like this was duplicated and then fixed as PR c++/84364.

*** This bug has been marked as a duplicate of bug 84364 ***

[Bug c++/77984] Invalid warning on templated operator= with -Weffc++

2017-11-22 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77984

--- Comment #6 from Eric Gallager  ---
(In reply to Eric Gallager from comment #5) 
> (In reply to Jonathan Wakely from comment #4)
> > No, but IMHO it should be (unless somebody fixes it, see PR 16166 and PR
> > 16168 and PR 55837 and others).
> 
> I'd rather see it fixed; I might give it a try myself once I learn enough
> c++ to know what I'm doing. In the meantime I'll make a meta-bug to gather
> all the -Weffc++ bugs together.

Update: The meta-bug is now bug 81930, for reference.

[Bug c++/77984] Invalid warning on templated operator= with -Weffc++

2017-08-22 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77984

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-08-22
 CC||egallager at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from Eric Gallager  ---
(In reply to Victor Paléologue from comment #0)
> Created attachment 39810 [details]
> Stand-alone C++ code reproducing a false warning
> 
> In the code attached, Thing::operator= is defined as following:
> 
> struct Thing
> {
>   template
>   Thing& operator=(const T&)
>   {
> return *this;
>   }
> };
> 
> Compiling it, I get a warning that does not seem legitimate:
> 
> $ g++ false_warning.cpp -Weffc++
> false_warning.cpp: In member function ‘Thing& Thing::operator=(const T&)’:
> false_warning.cpp:6:13: warning: ‘operator=’ should return a reference to
> ‘*this’ [-Weffc++]
>  return *this;
>  ^~~~
> 

Confirmed.

(In reply to Jonathan Wakely from comment #4)
> No, but IMHO it should be (unless somebody fixes it, see PR 16166 and PR
> 16168 and PR 55837 and others).

I'd rather see it fixed; I might give it a try myself once I learn enough c++
to know what I'm doing. In the meantime I'll make a meta-bug to gather all the
-Weffc++ bugs together.

[Bug c++/77984] Invalid warning on templated operator= with -Weffc++

2016-10-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77984

--- Comment #4 from Jonathan Wakely  ---
No, but IMHO it should be (unless somebody fixes it, see PR 16166 and PR 16168
and PR 55837 and others).

[Bug c++/77984] Invalid warning on templated operator= with -Weffc++

2016-10-21 Thread carlosmf.pt at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77984

--- Comment #3 from carlosmf.pt at gmail dot com ---
I also have the same issue when using -Weffc++.

Is efcc++ deprecated?

[Bug c++/77984] Invalid warning on templated operator= with -Weffc++

2016-10-15 Thread victor at paleologue dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77984

--- Comment #2 from Victor Paléologue  ---
Right, thanks for the reply.
But the, may it be fixed, or did the GCC project officially announce they
stopped supporting it?

[Bug c++/77984] Invalid warning on templated operator= with -Weffc++

2016-10-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77984

--- Comment #1 from Jonathan Wakely  ---
-Weffc++ is basically broken and not useful for modern C++ code.