support __alignof__ expressions like sizeof()
This commit is contained in:
parent
db98fc1c7e
commit
f3c1570c1f
@ -121,6 +121,7 @@ break return BREAK;
|
||||
continue return CONTINUE;
|
||||
|
||||
sizeof return SIZEOF;
|
||||
__alignof__ return ALIGNOF;
|
||||
|
||||
__attribute__ return ATTRIBUTE;
|
||||
__restrict return RESTRICT;
|
||||
|
@ -103,7 +103,7 @@ int yylex(YYSTYPE *, YYLTYPE *);
|
||||
%token CONTINUE;
|
||||
|
||||
%token SIZEOF;
|
||||
|
||||
%token ALIGNOF;
|
||||
|
||||
%token CHAR_CONST;
|
||||
%token INT_CONST;
|
||||
@ -162,6 +162,8 @@ unary_expression
|
||||
| unary_operator cast_expression
|
||||
| SIZEOF unary_expression
|
||||
| SIZEOF LPAREN type_name RPAREN
|
||||
| ALIGNOF unary_expression
|
||||
| ALIGNOF LPAREN type_name RPAREN
|
||||
;
|
||||
|
||||
unary_operator
|
||||
|
Loading…
x
Reference in New Issue
Block a user