This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45374] template keyword incorrectness// failure to parse valid code.
- From: "dpovey at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2010 21:51:55 -0000
- Subject: [Bug c++/45374] template keyword incorrectness// failure to parse valid code.
- References: <bug-45374-19329@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from dpovey at gmail dot com 2010-08-23 21:51 -------
(In reply to comment #1)
Yes you are right, but it is more than that bug, because I created an example
where gcc wrongly *rejects* code that it should accept, as well as one where it
wrongly accepts code that it should reject.
BTW, Visual Studio (2010) has different behavior -- it accepts both of the
statements in main(), even though they require different parse trees. However,
unlike gcc, it will not *accept* the "template" keyword on the line where (for
the first parse tree) it should be required. Thus, fixing this gcc bug will
lead people to code in such a way that their code cannot compile in Visual
Studio.
Dan
> Looks related to PR 11814.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45374