This is the mail archive of the gcc@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: [C++] cp_token::type and cp_token::keyword


Gabriel Dos Reis wrote:
> In cp/parser.c:cp_parser_declaration(), we have the following code
> 
>   /* Try to figure out what kind of declaration is present.  */
>   token1 = *cp_lexer_peek_token (parser->lexer);
> 
>   if (token1.type != CPP_EOF)
>     token2 = *cp_lexer_peek_nth_token (parser->lexer, 2);
>   else
>     token2.type = token2.keyword = RID_MAX;
> 
> It looks to me like the last line is a typo for
> 
>     {
>       token2.type = CPP_EOF;
>       token2.keyword = RID_MAX;
>     }

Yes.  The obvious patch is pre-approved.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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