This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: don't issue duplicate template errors
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 01 Feb 2005 04:08:28 -0200
- Subject: Re: don't issue duplicate template errors
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <20050118091525.19499.reichelt@gcc.gnu.org><20050131062627.29441.qmail@sourceware.org><orfz0h1lb4.fsf_-_@livre.redhat.lsd.ic.unicamp.br><41FE8293.80506@codesourcery.com>
On Jan 31, 2005, Mark Mitchell <mark@codesourcery.com> wrote:
> Alexandre Oliva wrote:
>> Doh! I've had an alternate patch for this bug ever since I learned
>> the original patch had caused so much trouble, and was wondering why
>> nobody bothered to review it. I just found out the reason: I hadn't
>> got 'round to actually posting it :-/
>> Here it is. Mark, can you tell whether the assumption after the
>> `???'
>> comment is correct? If so, ok to install?
> I *think* that the assumption is correct, in which case your patch is
> OK. If it turns out to be incorrect, we'll deal with that at that
> time. Patch OK, once you work out what test cases might need to change.
Ok, it's in, along with the testsuite fix, as well as this additional
patchlet that completes the reversal of the earlier patch (oops :-/
Testing in 3.4 now, I'll check it in the branch as soon as testing
completes.
Index: gcc/cp/parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.307
diff -u -p -r1.307 parser.c
--- gcc/cp/parser.c 1 Feb 2005 05:56:00 -0000 1.307
+++ gcc/cp/parser.c 1 Feb 2005 06:06:36 -0000
@@ -8512,8 +8512,7 @@ cp_parser_template_id (cp_parser *parser
should we re-parse the token stream, we will not have to repeat
the effort required to do the parse, nor will we issue duplicate
error messages about problems during instantiation of the
- template. Do so only if parsing succeeded, otherwise we may
- silently accept template arguments with syntax errors. */
+ template. */
if (start_of_id)
{
cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}