From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC68A385783A; Tue, 10 Aug 2021 11:19:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC68A385783A From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57012] pretty-printer does not handle well template parameter packs Date: Tue, 10 Aug 2021 11:19:30 +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.9.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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: bug_status everconfirmed cf_reconfirmed_on see_also 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:19:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57012 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2021-08-10 See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D54948 --- Comment #1 from Jonathan Wakely --- GCC improved error recovery with r219067 so that now it just prints one err= or: gcc/testsuite/g++.dg/cpp0x/pr31432.C:2:10: error: parameter pack =E2=80=98=E2=80=99 must be at the end of the templa= te parameter list 2 | template struct A // { dg-error "parameter p= ack" } | ^~~~~~~~ Printing "" is still not pretty. See also PR 54948 and PR 101844. If the template parameter (or template parameter pack) hasn't got a name, m= aybe we should not try to print it. The caret location already shows which pack we're talking about. If it's unnamed, maybe special case the diagnostic so it just says "paramet= er pack must be at the end ..." instead of making up a name which doesn't appe= ar in the source code.=