[Bug c++/93684] [8/9/10 Regression] ICE in cp_lexer_consume_token, at cp/parser.c:1120
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 12 15:41:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93684
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:e428a9cf85a8bdde9d031a215e10bd96eb3b789a
commit r10-6594-ge428a9cf85a8bdde9d031a215e10bd96eb3b789a
Author: Marek Polacek <polacek@redhat.com>
Date: Tue Feb 11 15:29:24 2020 -0500
c++: Fix ICE-on-invalid with broken attribute [PR93684]
We crash when parsing
[[a::
because we see a CPP_SCOPE and then we're trying to consume a CPP_EOF
token. So peek before consuming it.
PR c++/93684 - ICE-on-invalid with broken attribute.
* parser.c (cp_parser_std_attribute): Peek a token first before
consuming it.
* g++.dg/parse/attr4.C: New test.
More information about the Gcc-bugs
mailing list