diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-29 22:45:54 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-29 22:45:54 +0000 |
commit | d62e827b1a7a6485b9fe39cf1917708172874358 (patch) | |
tree | 86965b7acc5db54a702c131ce74a286eef70f176 /gcc/c-parser.c | |
parent | 3dbaf01be556fe89ae11efc1ac76726810baf51f (diff) | |
download | gcc-d62e827b1a7a6485b9fe39cf1917708172874358.tar.gz |
./:
* builtins.c (validate_gimple_arglist): Don't use va_arg with
enum type.
* calls.c (emit_library_call_value_1): Likewise.
* c-typeck.c (c_build_va_arg): New function.
* c-tree.h (c_build_va_arg): Declare.
* c-parser.c (c_parser_postfix_expression): Call c_build_va_arg
instead of build_va_arg.
cp/:
* error.c (cp_printer): Don't use va_arg with enum type.
testsuite/:
* gcc.dg/Wcxx-compat-11.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147989 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 0320feece40..244c238023d 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -5338,6 +5338,7 @@ c_parser_postfix_expression (c_parser *parser) expr.value = error_mark_node; break; } + loc = c_parser_peek_token (parser)->location; t1 = c_parser_type_name (parser); c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); @@ -5348,9 +5349,9 @@ c_parser_postfix_expression (c_parser *parser) else { tree type_expr = NULL_TREE; - expr.value = build_va_arg (e1.value, groktypename (t1, - &type_expr, - NULL)); + expr.value = c_build_va_arg (e1.value, + groktypename (t1, &type_expr, NULL), + loc); if (type_expr) { expr.value = build2 (C_MAYBE_CONST_EXPR, |