From 7f6149a019d796c479a1bbb6f1ad0a3181732dd2 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 17 Aug 2018 17:16:55 +0200 Subject: 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))). --- cparser/Parser.vy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Parser.vy') 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 -- cgit