FreeBSD/contrib/gcc/cp/decl.c
/* Push the declarations of builtin types into the namespace.
   RID_INDEX is the index of the builtin type in the array
   RID_POINTERS.  NAME is the name used when looking up the builtin
   type.  TYPE is the _TYPE node for the builtin type.  */
Push the declarations of builtin types into the namespace.
RID_INDEX is the index of the builtin type in the array
RID_POINTERS.  NAME is the name used when looking up the builtin
type.  TYPE is the _TYPE node for the builtin type.
Push the declarations of builtin types into the namespace . RID_INDEX is the index of the builtin type in the array RID_POINTERS . NAME is the name used when looking up the builtin type . TYPE is the _TYPE node for the builtin type .
void
record_builtin_type (enum rid rid_index,
		     const char* name,
		     tree type)
{
  tree rname = NULL_TREE, tname = NULL_TREE;
  tree tdecl = NULL_TREE;
  if ((int) rid_index < (int) RID_MAX)
    rname = ridpointers[(int) rid_index];
  if (name)
    tname = get_identifier (name);
  if (tname)
    {
      tdecl = build_decl (TYPE_DECL, tname, type);
      DECL_ARTIFICIAL (tdecl) = 1;
      SET_IDENTIFIER_GLOBAL_VALUE (tname, tdecl);
    }
  if (rname)
    {
      if (!tdecl)
	{
	  tdecl = build_decl (TYPE_DECL, rname, type);
	  DECL_ARTIFICIAL (tdecl) = 1;
	}
      SET_IDENTIFIER_GLOBAL_VALUE (rname, tdecl);
    }
  if (!TYPE_NAME (type))
    TYPE_NAME (type) = tdecl;
  if (tdecl)
    debug_hooks->type_decl (tdecl, 0);
}
void record_builtin_type ( enum rid rid_index , const char * name , tree type ) { tree rname = NULL_TREE , tname = NULL_TREE ; tree tdecl = NULL_TREE ; if ( ( int ) rid_index < ( int ) RID_MAX ) rname = ridpointers [ ( int ) rid_index ] ; if ( name ) tname = get_identifier ( name ) ; if ( tname ) { tdecl = build_decl ( TYPE_DECL , tname , type ) ; DECL_ARTIFICIAL ( tdecl ) = 1 ; SET_IDENTIFIER_GLOBAL_VALUE ( tname , tdecl ) ; } if ( rname ) { if ( ! tdecl ) { tdecl = build_decl ( TYPE_DECL , rname , type ) ; DECL_ARTIFICIAL ( tdecl ) = 1 ; } SET_IDENTIFIER_GLOBAL_VALUE ( rname , tdecl ) ; } if ( ! TYPE_NAME ( type ) ) TYPE_NAME ( type ) = tdecl ; if ( tdecl ) debug_hooks -> type_decl ( tdecl , 0 ) ; }
Push the declarations of builtin types into the namespace.
Push the declarations of builtin types into the namespace .
/* The calls to SET_IDENTIFIER_GLOBAL_VALUE below should be
     eliminated.  Built-in types should not be looked up name; their
     names are keywords that the parser can recognize.  However, there
     is code in c-common.c that uses identifier_global_value to look
     up built-in types by name.  */