Skip to content

Commit 6c6618b

Browse files
committed
Permit GCC attributes after struct/class in class declaration
1 parent cafaac5 commit 6c6618b

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
@@ -4399,6 +4399,16 @@ bool Parser::rClassSpec(typet &spec)
43994399
{
44004400
if(!optAlignas(spec))
44014401
return false;
4402+
4403+
if(lex.LookAhead(0)==TOK_GCC_ATTRIBUTE)
4404+
{
4405+
cpp_tokent tk;
4406+
lex.get_token(tk);
4407+
4408+
if(!rAttribute(spec))
4409+
return false;
4410+
}
4411+
44024412
irept name;
44034413

44044414
if(!rName(name))

0 commit comments

Comments
 (0)