Skip to content

Commit 82ad822

Browse files
committed
Permit GCC attributes after struct/class in class declaration
1 parent ae98146 commit 82ad822

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/cpp/parse.cpp

Lines changed: 10 additions & 0 deletions
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)