m3-sys/m3cc/gcc-apple/gcc/c-decl.c
/* Get the struct, enum or union (CODE says which) with tag NAME.
   Define the tag as a forward-reference if it is not defined.
   Return a c_typespec structure for the type specifier.  */
Get the struct, enum or union (CODE says which) with tag NAME.
Define the tag as a forward-reference if it is not defined.
Return a c_typespec structure for the type specifier.
Get the struct enum or union ( CODE says which ) with tag NAME . Define the tag as a forward - reference if it is not defined . Return a c_typespec structure for the type specifier .
struct c_typespec
parser_xref_tag (enum tree_code code, tree name)
{
  struct c_typespec ret;
  tree ref = lookup_tag (code, name, 0);
  ret.kind = (ref ? ctsk_tagref : ctsk_tagfirstref);
  if (ref && TREE_CODE (ref) == code)
    {
      ret.spec = ref;
      return ret;
    }
  ref = make_node (code);
  if (code == ENUMERAL_TYPE)
    {
      TYPE_MODE (ref) = TYPE_MODE (unsigned_type_node);
      TYPE_ALIGN (ref) = TYPE_ALIGN (unsigned_type_node);
      TYPE_USER_ALIGN (ref) = 0;
      TYPE_UNSIGNED (ref) = 1;
      TYPE_PRECISION (ref) = TYPE_PRECISION (unsigned_type_node);
      TYPE_MIN_VALUE (ref) = TYPE_MIN_VALUE (unsigned_type_node);
      TYPE_MAX_VALUE (ref) = TYPE_MAX_VALUE (unsigned_type_node);
    }
  pushtag (name, ref);
  ret.spec = ref;
  return ret;
}
struct c_typespec parser_xref_tag ( enum tree_code code , tree name ) { struct c_typespec ret ; tree ref = lookup_tag ( code , name , 0 ) ; ret . kind = ( ref ? ctsk_tagref : ctsk_tagfirstref ) ; if ( ref && TREE_CODE ( ref ) == code ) { ret . spec = ref ; return ret ; } ref = make_node ( code ) ; if ( code == ENUMERAL_TYPE ) { TYPE_MODE ( ref ) = TYPE_MODE ( unsigned_type_node ) ; TYPE_ALIGN ( ref ) = TYPE_ALIGN ( unsigned_type_node ) ; TYPE_USER_ALIGN ( ref ) = 0 ; TYPE_UNSIGNED ( ref ) = 1 ; TYPE_PRECISION ( ref ) = TYPE_PRECISION ( unsigned_type_node ) ; TYPE_MIN_VALUE ( ref ) = TYPE_MIN_VALUE ( unsigned_type_node ) ; TYPE_MAX_VALUE ( ref ) = TYPE_MAX_VALUE ( unsigned_type_node ) ; } pushtag ( name , ref ) ; ret . spec = ref ; return ret ; }
Get the struct, enum or union (CODE says which) with tag NAME.
Get the struct enum or union ( CODE says which ) with tag NAME .
/* If a cross reference is requested, look up the type
     already defined for this tag and return it.  */ /* If this is the right type of tag, return what we found.
     (This reference will be shadowed by shadow_tag later if appropriate.)
     If this is the wrong type of tag, do not return it.  If it was the
     wrong type in the same scope, we will have had an error
     message already; if in a different scope and declaring
     a name, pending_xref_error will give an error message; but if in a
     different scope and not declaring a name, this tag should
     shadow the previous declaration of a different type of tag, and
     this would not work properly if we return the reference found.
     (For example, with "struct foo" in an outer scope, "union foo;"
     must shadow that tag with a new one of union type.)  */ /* If no such tag is yet defined, create a forward-reference node
     and record it as the "definition".
     When a real declaration of this type is found,
     the forward-reference will be altered into a real type.  */ /* Give the type a default layout like unsigned int
	 to avoid crashing if it does not get defined.  */