FreeBSD/contrib/gcc/cp/decl.c
/* Update data for defined and undefined labels when leaving a scope.  */
Update data for defined and undefined labels when leaving a scope.
Update data for defined and undefined labels when leaving a scope .
static int
poplevel_named_label_1 (void **slot, void *data)
{
  struct named_label_entry *ent = (struct named_label_entry *) *slot;
  struct cp_binding_level *bl = (struct cp_binding_level *) data;
  struct cp_binding_level *obl = bl->level_chain;
  if (ent->binding_level == bl)
    {
      tree decl;
      for (decl = ent->names_in_scope; decl; decl = TREE_CHAIN (decl))
	if (decl_jump_unsafe (decl))
	  ent->bad_decls = tree_cons (NULL, decl, ent->bad_decls);
      ent->binding_level = obl;
      ent->names_in_scope = obl->names;
      switch (bl->kind)
	{
	case sk_try:
	  ent->in_try_scope = true;
	  break;
	case sk_catch:
	  ent->in_catch_scope = true;
	  break;
	case sk_omp:
	  ent->in_omp_scope = true;
	  break;
	default:
	  break;
	}
    }
  else if (ent->uses)
    {
      struct named_label_use_entry *use;
      for (use = ent->uses; use ; use = use->next)
	if (use->binding_level == bl)
	  {
	    use->binding_level = obl;
	    use->names_in_scope = obl->names;
	    if (bl->kind == sk_omp)
	      use->in_omp_scope = true;
	  }
    }
  return 1;
}
static int poplevel_named_label_1 ( void * * slot , void * data ) { struct named_label_entry * ent = ( struct named_label_entry * ) * slot ; struct cp_binding_level * bl = ( struct cp_binding_level * ) data ; struct cp_binding_level * obl = bl -> level_chain ; if ( ent -> binding_level == bl ) { tree decl ; for ( decl = ent -> names_in_scope ; decl ; decl = TREE_CHAIN ( decl ) ) if ( decl_jump_unsafe ( decl ) ) ent -> bad_decls = tree_cons ( NULL , decl , ent -> bad_decls ) ; ent -> binding_level = obl ; ent -> names_in_scope = obl -> names ; switch ( bl -> kind ) { case sk_try : ent -> in_try_scope = true ; break ; case sk_catch : ent -> in_catch_scope = true ; break ; case sk_omp : ent -> in_omp_scope = true ; break ; default : break ; } } else if ( ent -> uses ) { struct named_label_use_entry * use ; for ( use = ent -> uses ; use ; use = use -> next ) if ( use -> binding_level == bl ) { use -> binding_level = obl ; use -> names_in_scope = obl -> names ; if ( bl -> kind == sk_omp ) use -> in_omp_scope = true ; } } return 1 ; }
Update data for defined and undefined labels when leaving a scope.
Update data for defined and undefined labels when leaving a scope .