FreeBSD/contrib/gcc/c-decl.c
/* Make sure that the tag NAME is defined *in the current scope*
   at least as a forward reference.
   CODE says which kind of tag NAME ought to be.  */
Make sure that the tag NAME is defined *in the current scope
at least as a forward reference.
CODE says which kind of tag NAME ought to be.
Make sure that the tag NAME is defined * in the current scope at least as a forward reference . CODE says which kind of tag NAME ought to be .
tree
start_struct (enum tree_code code, tree name)
{
  tree ref = 0;
  if (name != 0)
    ref = lookup_tag (code, name, 1);
  if (ref && TREE_CODE (ref) == code)
    {
      if (TYPE_SIZE (ref))
	{
	  if (code == UNION_TYPE)
	    error ("redefinition of %<union %E%>", name);
	  else
	    error ("redefinition of %<struct %E%>", name);
	}
      else if (C_TYPE_BEING_DEFINED (ref))
	{
	  if (code == UNION_TYPE)
	    error ("nested redefinition of %<union %E%>", name);
	  else
	    error ("nested redefinition of %<struct %E%>", name);
	  ref = NULL_TREE;
	}
    }
  if (ref == NULL_TREE || TREE_CODE (ref) != code)
    {
      ref = make_node (code);
      pushtag (name, ref);
    }
  C_TYPE_BEING_DEFINED (ref) = 1;
  TYPE_PACKED (ref) = flag_pack_struct;
  return ref;
}
tree start_struct ( enum tree_code code , tree name ) { tree ref = 0 ; if ( name != 0 ) ref = lookup_tag ( code , name , 1 ) ; if ( ref && TREE_CODE ( ref ) == code ) { if ( TYPE_SIZE ( ref ) ) { if ( code == UNION_TYPE ) error ( " " , name ) ; else error ( " " , name ) ; } else if ( C_TYPE_BEING_DEFINED ( ref ) ) { if ( code == UNION_TYPE ) error ( " " , name ) ; else error ( " " , name ) ; ref = NULL_TREE ; } } if ( ref == NULL_TREE || TREE_CODE ( ref ) != code ) { ref = make_node ( code ) ; pushtag ( name , ref ) ; } C_TYPE_BEING_DEFINED ( ref ) = 1 ; TYPE_PACKED ( ref ) = flag_pack_struct ; return ref ; }
Make sure that the tag NAME is defined *in the current scope
at least as a forward reference.
Make sure that the tag NAME is defined * in the current scope at least as a forward reference .
/* If there is already a tag defined at this scope
     (as a forward reference), just return it.  */ /* Don't create structures that contain themselves.  */ /* Otherwise create a forward-reference just so the tag is in scope.  */