attr4.C
99 Bytes
-
c++: Fix ICE-on-invalid with broken attribute [PR93684] · e428a9cf
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.
Marek Polacek committed