[obvious] Remove CHECKING_P in coroutines.cc for release checking.

Message ID 031f9fa2-5a76-4ac3-5d05-7481b10988d4@suse.cz
State New
Headers show
Series
  • [obvious] Remove CHECKING_P in coroutines.cc for release checking.
Related show

Commit Message

Martin Liška April 24, 2020, 6:45 a.m.
Hi.

One can also have enabled gcc_checking_assert in a release build
and that's why coro_body_contains_bind_expr_p can't be guarded
in a CHECKING_P macro.

I'm going to install it as obvious. I've just tested both release and
non-release builds.

Thanks,
Martin

gcc/cp/ChangeLog:

2020-04-24  Martin Liska  <mliska@suse.cz>

	* coroutines.cc: Fix compilation error for release checking
	where we miss declaration of ‘coro_body_contains_bind_expr_p’.
---
  gcc/cp/coroutines.cc | 2 --
  1 file changed, 2 deletions(-)

Patch

diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc
index bec165b6ec6..4f254b7fd10 100644
--- a/gcc/cp/coroutines.cc
+++ b/gcc/cp/coroutines.cc
@@ -3441,7 +3441,6 @@  act_des_fn (tree orig, tree fn_type, tree coro_frame_ptr, const char* name)
   return fn;
 }
 
-#if CHECKING_P
 /* Return a bind expression if we see one, else NULL_TREE.  */
 static tree
 bind_expr_find_in_subtree (tree *stmt, int *, void *)
@@ -3460,7 +3459,6 @@  coro_body_contains_bind_expr_p (tree *stmt)
   hash_set<tree> visited;
   return cp_walk_tree (stmt, bind_expr_find_in_subtree, NULL, &visited);
 }
-#endif
 
 /* Here we:
    a) Check that the function and promise type are valid for a