c++: add assert to cp_make_fname_decl
In the PR118629 testcase, pushdecl_outermost_localscope was failing and returning error_mark_node without ever actually giving an error; in addition to my earlier fix for the failure, make sure failures aren't silent. gcc/cp/ChangeLog: * decl.cc (cp_make_fname_decl): Prevent silent failure.
This commit is contained in:
parent
47b62be9ca
commit
eff4dc4233
1 changed files with 2 additions and 0 deletions
|
@ -5339,6 +5339,8 @@ cp_make_fname_decl (location_t loc, tree id, int type_dep)
|
|||
decl = pushdecl_outermost_localscope (decl);
|
||||
if (decl != error_mark_node)
|
||||
add_decl_expr (decl);
|
||||
else
|
||||
gcc_assert (seen_error ());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue