File tree 1 file changed +13
-17
lines changed
1 file changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -2001,7 +2001,7 @@ bool Parser::optCvQualify(typet &cv)
2001
2001
if (t==TOK_CONSTEXPR ||
2002
2002
t==TOK_CONST || t==TOK_VOLATILE || t==TOK_RESTRICT ||
2003
2003
t==TOK_PTR32 || t==TOK_PTR64 ||
2004
- t==TOK_GCC_ATTRIBUTE)
2004
+ t==TOK_GCC_ATTRIBUTE || t==TOK_GCC_ASM )
2005
2005
{
2006
2006
cpp_tokent tk;
2007
2007
lex.get_token (tk);
@@ -2050,6 +2050,18 @@ bool Parser::optCvQualify(typet &cv)
2050
2050
return false ;
2051
2051
break ;
2052
2052
2053
+ case TOK_GCC_ASM:
2054
+ // asm post-declarator
2055
+ // this is stuff like
2056
+ // int x __asm("asd")=1, y;
2057
+ if (lex.get_token (tk)!=' (' )
2058
+ return false ;
2059
+ if (!rString (tk))
2060
+ return false ;
2061
+ if (lex.get_token (tk)!=' )' )
2062
+ return false ;
2063
+ break ;
2064
+
2053
2065
default :
2054
2066
UNREACHABLE;
2055
2067
break ;
@@ -2816,22 +2828,6 @@ bool Parser::rDeclaratorWithInit(
2816
2828
should_be_declarator, is_statement))
2817
2829
return false ;
2818
2830
2819
- // asm post-declarator
2820
- if (lex.LookAhead (0 )==TOK_GCC_ASM)
2821
- {
2822
- // this is stuff like
2823
- // int x __asm("asd")=1, y;
2824
- cpp_tokent tk;
2825
- lex.get_token (tk); // TOK_GCC_ASM
2826
-
2827
- if (lex.get_token (tk)!=' (' )
2828
- return false ;
2829
- if (!rString (tk))
2830
- return false ;
2831
- if (lex.get_token (tk)!=' )' )
2832
- return false ;
2833
- }
2834
-
2835
2831
int t=lex.LookAhead (0 );
2836
2832
if (t==' =' )
2837
2833
{
You can’t perform that action at this time.
0 commit comments