aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/pre_parser.mly
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2017-02-01 12:59:55 +0100
committerGitHub <noreply@github.com>2017-02-01 12:59:55 +0100
commit31f86965bf172fb32f9cca99a292ebdf6cea57b9 (patch)
treeef78d97a02e2dad0e39ccd345288adf3545bb05e /cparser/pre_parser.mly
parent71fa5147139f85cb0d14ded74b04b39dd52f776b (diff)
parented55884ea9749f93ffd67f0734da0907fe338102 (diff)
downloadcompcert-kvx-31f86965bf172fb32f9cca99a292ebdf6cea57b9.tar.gz
compcert-kvx-31f86965bf172fb32f9cca99a292ebdf6cea57b9.zip
Merge pull request #159 from AbsInt/builtin_offsetof
Implement offsetof via builtin
Diffstat (limited to 'cparser/pre_parser.mly')
-rw-r--r--cparser/pre_parser.mly3
1 files changed, 2 insertions, 1 deletions
diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly
index 613ec17f..dc9c5319 100644
--- a/cparser/pre_parser.mly
+++ b/cparser/pre_parser.mly
@@ -57,7 +57,7 @@
AUTO REGISTER INLINE NORETURN CHAR SHORT INT LONG SIGNED UNSIGNED FLOAT DOUBLE
UNDERSCORE_BOOL CONST VOLATILE VOID STRUCT UNION ENUM CASE DEFAULT IF ELSE
SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN BUILTIN_VA_ARG ALIGNOF
- ATTRIBUTE ALIGNAS PACKED ASM
+ ATTRIBUTE ALIGNAS PACKED ASM BUILTIN_OFFSETOF
%token EOF
@@ -254,6 +254,7 @@ postfix_expression:
| postfix_expression LBRACK expression RBRACK
| postfix_expression LPAREN argument_expression_list? RPAREN
| BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name RPAREN
+| BUILTIN_OFFSETOF LPAREN type_name COMMA designator_list RPAREN
| postfix_expression DOT other_identifier
| postfix_expression PTR other_identifier
| postfix_expression INC