FreeBSD/contrib/gcc/cp/name-lookup.c
/* Deal with a using-directive seen by the parser.  Currently we only
   handle attributes here, since they cannot appear inside a template.  */
Deal with a using-directive seen by the parser.  Currently we only
handle attributes here, since they cannot appear inside a template.
Deal with a using - directive seen by the parser . Currently we only handle attributes here since they cannot appear inside a template .
void
parse_using_directive (tree namespace, tree attribs)
{
  tree a;
  do_using_directive (namespace);
  for (a = attribs; a; a = TREE_CHAIN (a))
    {
      tree name = TREE_PURPOSE (a);
      if (is_attribute_p ("strong", name))
	{
	  if (!toplevel_bindings_p ())
	    error ("strong using only meaningful at namespace scope");
	  else if (namespace != error_mark_node)
	    {
	      if (!is_ancestor (current_namespace, namespace))
		error ("current namespace %qD does not enclose strongly used namespace %qD",
		       current_namespace, namespace);
	      DECL_NAMESPACE_ASSOCIATIONS (namespace)
		= tree_cons (current_namespace, 0,
			     DECL_NAMESPACE_ASSOCIATIONS (namespace));
	    }
	}
      else
	warning (OPT_Wattributes, "%qD attribute directive ignored", name);
    }
}
void parse_using_directive ( tree namespace , tree attribs ) { tree a ; do_using_directive ( namespace ) ; for ( a = attribs ; a ; a = TREE_CHAIN ( a ) ) { tree name = TREE_PURPOSE ( a ) ; if ( is_attribute_p ( " " , name ) ) { if ( ! toplevel_bindings_p ( ) ) error ( " " ) ; else if ( namespace != error_mark_node ) { if ( ! is_ancestor ( current_namespace , namespace ) ) error ( " " , current_namespace , namespace ) ; DECL_NAMESPACE_ASSOCIATIONS ( namespace ) = tree_cons ( current_namespace , 0 , DECL_NAMESPACE_ASSOCIATIONS ( namespace ) ) ; } } else warning ( OPT_Wattributes , " " , name ) ; } }
Deal with a using-directive seen by the parser.
Deal with a using - directive seen by the parser .