From: Carl Worth Date: Wed, 26 May 2010 15:09:29 +0000 (-0700) Subject: Expand macro arguments before performing argument substitution. X-Git-Tag: 062012170305~10660^2~625^2~100^2~10^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5cd40343f4a83d3270cb87ef38e85dcb9682e8c;p=profile%2Fivi%2Fmesa.git Expand macro arguments before performing argument substitution. As required by the C99 specification of the preprocessor. With this fix, tests 33 through 36 now pass. --- diff --git a/glcpp-parse.y b/glcpp-parse.y index e25cfa9..3b736f8 100644 --- a/glcpp-parse.y +++ b/glcpp-parse.y @@ -854,10 +854,11 @@ _glcpp_parser_expand_function_onto (glcpp_parser_t *parser, token_list_t *argument; argument = _argument_list_member_at (arguments, parameter_index); - for (j = argument->head; j; j = j->next) - { - _token_list_append (substituted, j->token); - } + /* Before substituting, we expand the argument + * tokens. */ + _glcpp_parser_expand_token_list_onto (parser, + argument, + substituted); } else { _token_list_append (substituted, i->token); }