https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126709
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #1)
> The problem here is that ':]' is consumed before skipping the following
> ']'/':]' via cp_parser_skip_to_closing_square_bracket.
>
>
> Thus, we could either add another 'dg-error' line - or do the following,
> which only affects this testcase. I am not sure what's better.
>
> --- a/gcc/cp/parser.cc
> +++ b/gcc/cp/parser.cc
> @@ -9466,2 +9466,2 @@ post_colon_parsing:
> - if (!open_splice)
> + if (!open_splice && (!close_splice || index != error_mark_node))
> cp_lexer_consume_token (parser->lexer);
Or not call _skip_ below if close_splice?