This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: don't issue duplicate template errors


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}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]