diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2018-08-17 17:16:55 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2018-08-17 17:16:55 +0200 |
commit | 7f6149a019d796c479a1bbb6f1ad0a3181732dd2 (patch) | |
tree | 6b4a188ddb6bd274ec65ba20b5081a241b89c906 /cparser | |
parent | 3bf5dcea0935b280189d04c34e84e46fb07f87e7 (diff) | |
download | compcert-7f6149a019d796c479a1bbb6f1ad0a3181732dd2.tar.gz compcert-7f6149a019d796c479a1bbb6f1ad0a3181732dd2.zip |
Wrong AST for GCC-style attributes
The list of arguments to the attribute was missing a reverse, hence
attribute(("foo"(1,2,3))) was actually read as attribute(("foo"(3,2,1))).
Diffstat (limited to 'cparser')
-rw-r--r-- | cparser/Parser.vy | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cparser/Parser.vy b/cparser/Parser.vy index b3731809..79e3793d 100644 --- a/cparser/Parser.vy +++ b/cparser/Parser.vy @@ -560,7 +560,7 @@ gcc_attribute: | w = gcc_attribute_word LPAREN RPAREN { GCC_ATTR_ARGS w [] } | w = gcc_attribute_word LPAREN args = argument_expression_list RPAREN - { GCC_ATTR_ARGS w args } + { GCC_ATTR_ARGS w (rev' args) } gcc_attribute_word: | i = OTHER_NAME |