This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/77398] first argument to va_arg not of type va_list error hidden by other error
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Aug 2016 16:42:05 +0000
- Subject: [Bug c/77398] first argument to va_arg not of type va_list error hidden by other error
- Auto-submitted: auto-generated
- References: <bug-77398-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77398
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Author: vries
Date: Mon Aug 29 16:41:33 2016
New Revision: 239827
URL: https://gcc.gnu.org/viewcvs?rev=239827&root=gcc&view=rev
Log:
Handle errors in both args of va_arg
2016-08-29 Tom de Vries <tom@codesourcery.com>
PR c/77398
* c-common.c (build_va_arg): Add first argument error. Build va_arg
with error_mark_node as va_list instead of with illegal va_list.
* gimplify.c (gimplify_va_arg_expr): Replace first argument type error
with assert.
* g++.dg/ext/va-arg1.C: Add error check for illegal first argument.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/va-arg1.C