This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] cp_token::type and cp_token::keyword
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 01 Dec 2005 11:37:44 -0800
- Subject: Re: [C++] cp_token::type and cp_token::keyword
- References: <m3r78xsoim.fsf@uniton.integrable-solutions.net>
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