From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 00581385783A; Tue, 10 Aug 2021 11:32:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00581385783A From: "tobi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101811] Error not helpful for misplaced 'template' Date: Tue, 10 Aug 2021 11:32:17 +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: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: tobi 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: 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: Tue, 10 Aug 2021 11:32:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101811 --- Comment #4 from Tobias Schl=C3=BCter --- Hi Jonathan, I know that we disagree about clang's error message and that's why I tried = to explain what makes clang's a better error message for me. My "parsing" of clang's error message was not a comparison to gcc's, but an analysis how it conveys all the information I need to find and fix the issue.=20 Glad to see that we more or less agree on the issues with gcc's message, though. That's the important part anyway. I also like your suggestion. I= f we are at a stage where grammatical niceties matter, I would make the symbol in the first message the subject, so :6:6: error: 'template void X::f()' matches no declaration 6 | void X::f() | ^ :2:10: note: non-matching declaration 'void X::f()' is not a templa= te 2 | void f(); | ^=20 Thanks for correcting my misunderstanding about the status of the C++ FE, a= nd I'm glad to hear that. I really wonder where I'd picked up that piece of misinformation. Actually, while I wrote this I was wondering "how do they manage to stay up to speed with the latest versions then?" Now I'm less impressed ;-) Cheers!=