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: [PATCH] Fix PR c++/31745: ICE on invalid use of namespace


Simon Martin wrote:
> Hi all.
> 
> I attach an updated patch, that uses 'cp_lexer_next_token_is (...,
> CPP_CLOSE_BRACE)' instead of 'cp_lexer_next_token_is_not (..., CPP_EOF)'
> as suggested by Manuel, and that also fixes the other testcase that
> triggers a similar ICE in another part of the code, contributed by Lee.

This version is OK -- though I think that Manuel is correct that
updating cp_parser_skip_to_closing_brace to return the next token type,
or a boolean indicating whether it found a closing brace, is a nice
idea, just in making the code a little simpler.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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