aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Parser.vy
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2018-08-17 17:16:55 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2018-08-17 17:16:55 +0200
commit7f6149a019d796c479a1bbb6f1ad0a3181732dd2 (patch)
tree6b4a188ddb6bd274ec65ba20b5081a241b89c906 /cparser/Parser.vy
parent3bf5dcea0935b280189d04c34e84e46fb07f87e7 (diff)
downloadcompcert-kvx-7f6149a019d796c479a1bbb6f1ad0a3181732dd2.tar.gz
compcert-kvx-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/Parser.vy')
-rw-r--r--cparser/Parser.vy2
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