From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 515FC3864825; Wed, 11 Aug 2021 21:43:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 515FC3864825 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58363] Confusing error message for uncalled explicit destructor in expression Date: Wed, 11 Aug 2021 21:43:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_reconfirmed_on bug_severity everconfirmed keywords bug_status Message-ID: In-Reply-To: References: 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: Wed, 11 Aug 2021 21:43:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58363 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-08-11 Severity|minor |enhancement Ever confirmed|0 |1 Keywords| |diagnostic Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski --- We get now: :6:6: error: no match for 'operator+' (operand types are 'l' and 'void') 6 | l() + m.~f; | ~~~ ^ ~ | | | | l void :2:22: note: candidate: 'template void operator+(l, int)' 2 | template void operator+(l x, int y); | ^~~~~~~~ :2:22: note: template argument deduction/substitution failed: :6:11: note: couldn't deduce template parameter 'D' 6 | l() + m.~f; | ^ clang gives an extra error message: :6:8: error: reference to pseudo-destructor must be called; did you mean to call it with no arguments? l() + m.~f; ^~~~ ()=