aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
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
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')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parse.y6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b3a5dfd..9bbf5b9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
+ * parse.y (unary_expr): Move VA_ARG from here ...
+ (primary): ... to here.
+
+2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
+
* semantics.c (finish_id_expr): If type is error_mark, return
error_mark.
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