Skip to content

Commit d5183fb

Browse files
committed
Permit GCC attributes after struct/class in class declaration
1 parent d82f554 commit d5183fb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/cpp/parse.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -4398,6 +4398,16 @@ bool Parser::rClassSpec(typet &spec)
43984398
{
43994399
if(!optAlignas(spec))
44004400
return false;
4401+
4402+
if(lex.LookAhead(0)==TOK_GCC_ATTRIBUTE)
4403+
{
4404+
cpp_tokent tk;
4405+
lex.get_token(tk);
4406+
4407+
if(!rAttribute(spec))
4408+
return false;
4409+
}
4410+
44014411
irept name;
44024412

44034413
if(!rName(name))

0 commit comments

Comments
 (0)