FreeBSD/contrib/gcc/cp/name-lookup.c
/* Add DECL to the list of things declared in B.  */
Add DECL to the list of things declared in B.
Add DECL to the list of things declared in B .
static void
add_decl_to_level (tree decl, cxx_scope *b)
{
  if (TREE_CODE (decl) == NAMESPACE_DECL
      && !DECL_NAMESPACE_ALIAS (decl))
    {
      TREE_CHAIN (decl) = b->namespaces;
      b->namespaces = decl;
    }
  else if (TREE_CODE (decl) == VAR_DECL && DECL_VIRTUAL_P (decl))
    {
      TREE_CHAIN (decl) = b->vtables;
      b->vtables = decl;
    }
  else
    {
      TREE_CHAIN (decl) = b->names;
      b->names = decl;
      b->names_size++;
      if (b->kind == sk_namespace)
	if ((TREE_CODE (decl) == VAR_DECL
	     && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
	    || (TREE_CODE (decl) == FUNCTION_DECL
		&& (!TREE_PUBLIC (decl) || DECL_DECLARED_INLINE_P (decl))))
	  VEC_safe_push (tree, gc, b->static_decls, decl);
    }
}
static void add_decl_to_level ( tree decl , cxx_scope * b ) { if ( TREE_CODE ( decl ) == NAMESPACE_DECL && ! DECL_NAMESPACE_ALIAS ( decl ) ) { TREE_CHAIN ( decl ) = b -> namespaces ; b -> namespaces = decl ; } else if ( TREE_CODE ( decl ) == VAR_DECL && DECL_VIRTUAL_P ( decl ) ) { TREE_CHAIN ( decl ) = b -> vtables ; b -> vtables = decl ; } else { TREE_CHAIN ( decl ) = b -> names ; b -> names = decl ; b -> names_size ++ ; if ( b -> kind == sk_namespace ) if ( ( TREE_CODE ( decl ) == VAR_DECL && ( TREE_STATIC ( decl ) || DECL_EXTERNAL ( decl ) ) ) || ( TREE_CODE ( decl ) == FUNCTION_DECL && ( ! TREE_PUBLIC ( decl ) || DECL_DECLARED_INLINE_P ( decl ) ) ) ) VEC_safe_push ( tree , gc , b -> static_decls , decl ) ; } }
Add DECL to the list of things declared in B.
Add DECL to the list of things declared in B .
/* We build up the list in reverse order, and reverse it later if
	 necessary.  */ /* If appropriate, add decl to separate list of statics.  We
	 include extern variables because they might turn out to be
	 static later.  It's OK for this list to contain a few false
	 positives.  */