aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parse.y
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-11-24 10:30:46 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-11-24 10:30:46 +0000
commit2f401cc807e4a272e511d76e7711c05c967956da (patch)
tree20a099d0a6fc33aefedda658079bc41fbd79cb59 /gcc/cp/parse.y
parent3d7e9ba41e50b16c6d77392d3fd85a8f46c9f13e (diff)
downloadgcc-2f401cc807e4a272e511d76e7711c05c967956da.zip
gcc-2f401cc807e4a272e511d76e7711c05c967956da.tar.gz
gcc-2f401cc807e4a272e511d76e7711c05c967956da.tar.bz2
c-parse.in (unary_expr): Move VA_ARG from here ...
* c-parse.in (unary_expr): Move VA_ARG from here ... (primary): ... to here. cp: * parse.y (unary_expr): Move VA_ARG from here ... (primary): ... to here. testsuite: * g++.old-deja/g++.other/vaarg4.C: New test. * gcc.c-torture/compile/20001123-1.c: New test. From-SVN: r37703
Diffstat (limited to 'gcc/cp/parse.y')
-rw-r--r--gcc/cp/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index d55f1b9..9e32911 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -1252,9 +1252,6 @@ unary_expr:
{ $$ = build_x_unary_op (REALPART_EXPR, $2); }
| IMAGPART cast_expr %prec UNARY
{ $$ = build_x_unary_op (IMAGPART_EXPR, $2); }
- | VA_ARG '(' expr_no_commas ',' type_id ')'
- { $$ = build_x_va_arg ($3, groktypename ($5.t));
- check_for_new_type ("__builtin_va_arg", $5); }
;
new_placement:
@@ -1562,6 +1559,9 @@ primary:
{ $$ = finish_call_expr ($1, $3, 0); }
| primary LEFT_RIGHT
{ $$ = finish_call_expr ($1, NULL_TREE, 0); }
+ | VA_ARG '(' expr_no_commas ',' type_id ')'
+ { $$ = build_x_va_arg ($3, groktypename ($5.t));
+ check_for_new_type ("__builtin_va_arg", $5); }
| primary '[' expr ']'
{ $$ = grok_array_decl ($$, $3); }
| primary PLUSPLUS