From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6978 invoked by alias); 20 Apr 2013 12:03:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6942 invoked by uid 48); 20 Apr 2013 12:03:29 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54948] template unnecessarily displayed as "A< template-parameter-1-1 >" not "A" Date: Sat, 20 Apr 2013 12:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01791.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54948 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #2 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez 2013-04-20 12:03:29 UTC --- There are several "bugs" in this case. The first one is that we consider th= at the type of: template struct A is "struct A< >". It would be nicer to print somet= hing like "struct A" or "struct A<>". Clang never needs to print made = up names. The second bug is that I think we record T when parsing, but later we drop = it. I wasn't able to find when we drop it. There is a lot going on between the moment we parse T and the moment we parse {, so it is rather difficult to figure out. Stepping in the parser is rather frustrating. I am afraid that the only person that may know what is going or where to lo= ok is Jason. There is lookup_template_class, but by the time we call it, we already dropped T (or so it seems to me, maybe it is recorded somewhere els= e). >>From gcc-bugs-return-420647-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 20 12:06:13 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 8678 invoked by alias); 20 Apr 2013 12:06:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 8633 invoked by uid 48); 20 Apr 2013 12:06:10 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54948] template unnecessarily displayed as "A< template-parameter-1-1 >" not "A" Date: Sat, 20 Apr 2013 12:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01792.txt.bz2 Content-length: 300 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54948 --- Comment #3 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez 2013-04-20 12:06:10 UTC --- BTW, the parser may benefit by marking some functions with "skip" to help debugging. All the cp_lexer_peek_* are useless to step into. >>From gcc-bugs-return-420648-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 20 12:28:35 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 17843 invoked by alias); 20 Apr 2013 12:28:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 17816 invoked by uid 48); 20 Apr 2013 12:28:31 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57012] New: pretty-printer does not handle well template parameter packs Date: Sat, 20 Apr 2013 12:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01793.txt.bz2 Content-length: 1768 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57012 Bug #: 57012 Summary: pretty-printer does not handle well template parameter packs Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: manu@gcc.gnu.org /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:2:40: error: parameter pack '' must be at the end of the template parameter list /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:7:11: error: type/value mismatch at argument 1 in template parameter list for 'template<, class> struct A' /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:7:11: error: expected a constant of type '', got 'int' /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:7:14: error: invalid type in declaration before ';' token /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:8:11: error: type/value mismatch at argument 1 in template parameter list for 'template<, class> struct A' /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:8:11: error: expected a constant of type '', got 'char' /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:8:14: error: invalid type in declaration before ';' token Clang++ by comparison: /home/manuel/test3/src/gcc/testsuite/g++.dg/cpp0x/pr31432.C:2:10: error: template parameter pack must be the last template parameter template struct A // { dg-error "parameter pack" } ^