From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAD0D3854815; Tue, 26 Jan 2021 17:33:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAD0D3854815 From: "o.mandel at menlosystems dot com" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjKysvOTg4NDFdIE5ldzogd3Jvbmcg4oCYb3BlcmF0b3I9?= =?UTF-8?B?4oCZIHNob3VsZCByZXR1cm4gYSByZWZlcmVuY2UgdG8g4oCYKnRoaXPigJkg?= =?UTF-8?B?Wy1XZWZmYysrXQ==?= Date: Tue, 26 Jan 2021 17:33:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: o.mandel at menlosystems dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2021 17:33:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98841 Bug ID: 98841 Summary: wrong =E2=80=98operator=3D=E2=80=99 should return a ref= erence to =E2=80=98*this=E2=80=99 [-Weffc++] Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: o.mandel at menlosystems dot com Target Milestone: --- Created attachment 50059 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50059&action=3Dedit Console output of version 8.3.0 I get unexpected warnings about "'operator=3D' should return a reference to '*this' [-Weffc++]". This happens for at least versions 8.3.0 and 10.2.0 of g++. The output of t= he following command is attached for both versions: g++ -v -save-temps -Weffc++ -c t.cpp In the minimal demo used here this only happens for a template member funct= ion, but in larger code it can also be observed for a plain member function: see e.g. https://github.com/jbeder/yaml-cpp/issues/970 This might be the same issue as mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D84364#c9 (why the comment as= ked for that ticket to be reopened)?=