mirror of git://gcc.gnu.org/git/gcc.git
Replace error_at with assert in build_va_arg
2016-08-29 Tom de Vries <tom@codesourcery.com> * c-common.c (build_va_arg): Replace first argument type error with assert. From-SVN: r239828
This commit is contained in:
parent
ba9bbd6f58
commit
f162d71712
|
|
@ -1,3 +1,8 @@
|
|||
2016-08-29 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* c-common.c (build_va_arg): Replace first argument type error
|
||||
with assert.
|
||||
|
||||
2016-08-29 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR c/77398
|
||||
|
|
|
|||
|
|
@ -5832,12 +5832,7 @@ build_va_arg (location_t loc, tree expr, tree type)
|
|||
/* Verify that &ap is still recognized as having va_list type. */
|
||||
tree canon_expr_type
|
||||
= targetm.canonical_va_list_type (TREE_TYPE (expr));
|
||||
if (canon_expr_type == NULL_TREE)
|
||||
{
|
||||
error_at (loc,
|
||||
"first argument to %<va_arg%> not of type %<va_list%>");
|
||||
return error_mark_node;
|
||||
}
|
||||
gcc_assert (canon_expr_type != NULL_TREE);
|
||||
|
||||
return build_va_arg_1 (loc, type, expr);
|
||||
}
|
||||
|
|
@ -5905,12 +5900,7 @@ build_va_arg (location_t loc, tree expr, tree type)
|
|||
/* Verify that &ap is still recognized as having va_list type. */
|
||||
tree canon_expr_type
|
||||
= targetm.canonical_va_list_type (TREE_TYPE (expr));
|
||||
if (canon_expr_type == NULL_TREE)
|
||||
{
|
||||
error_at (loc,
|
||||
"first argument to %<va_arg%> not of type %<va_list%>");
|
||||
return error_mark_node;
|
||||
}
|
||||
gcc_assert (canon_expr_type != NULL_TREE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue