FreeBSD/contrib/gcc/cp/decl.c
/* Make a definition for a builtin function named NAME in the current
   namespace, whose data type is TYPE and whose context is CONTEXT.
   TYPE should be a function type with argument types.

   CLASS and CODE tell later passes how to compile calls to this function.
   See tree.h for possible values.

   If LIBNAME is nonzero, use that for DECL_ASSEMBLER_NAME,
   the name to be called if we can't opencode the function.
   If ATTRS is nonzero, use that for the function's attribute
   list.  */
Make a definition for a builtin function named NAME in the current
namespace, whose data type is TYPE and whose context is CONTEXT.
TYPE should be a function type with argument types.

CLASS and CODE tell later passes how to compile calls to this function.
See tree.h for possible values.

If LIBNAME is nonzero, use that for DECL_ASSEMBLER_NAME,
the name to be called if we can't opencode the function.
If ATTRS is nonzero, use that for the function's attribute
list.
Make a definition for a builtin function named NAME in the current namespace whose data type is TYPE and whose context is CONTEXT . TYPE should be a function type with argument types . CLASS and CODE tell later passes how to compile calls to this function . See tree . h for possible values . If LIBNAME is nonzero use that for DECL_ASSEMBLER_NAME the name to be called if we can ' t opencode the function . If ATTRS is nonzero use that for the function ' s attribute list .
static tree
builtin_function_1 (const char* name,
		    tree type,
		    tree context,
		    enum built_in_function code,
		    enum built_in_class class,
		    const char* libname,
		    tree attrs)
{
  tree decl = build_library_fn_1 (get_identifier (name), ERROR_MARK, type);
  DECL_BUILT_IN_CLASS (decl) = class;
  DECL_FUNCTION_CODE (decl) = code;
  DECL_CONTEXT (decl) = context;
  pushdecl (decl);
  if (libname)
    SET_DECL_ASSEMBLER_NAME (decl, get_identifier (libname));
  if (name[0] != '_' || name[1] != '_')
    DECL_ANTICIPATED (decl) = 1;
  if (attrs)
    decl_attributes (&decl, attrs, ATTR_FLAG_BUILT_IN);
  else
    decl_attributes (&decl, NULL_TREE, 0);
  return decl;
}
static tree builtin_function_1 ( const char * name , tree type , tree context , enum built_in_function code , enum built_in_class class , const char * libname , tree attrs ) { tree decl = build_library_fn_1 ( get_identifier ( name ) , ERROR_MARK , type ) ; DECL_BUILT_IN_CLASS ( decl ) = class ; DECL_FUNCTION_CODE ( decl ) = code ; DECL_CONTEXT ( decl ) = context ; pushdecl ( decl ) ; if ( libname ) SET_DECL_ASSEMBLER_NAME ( decl , get_identifier ( libname ) ) ; if ( name [ 0 ] != ' ' || name [ 1 ] != ' ' ) DECL_ANTICIPATED ( decl ) = 1 ; if ( attrs ) decl_attributes ( & decl , attrs , ATTR_FLAG_BUILT_IN ) ; else decl_attributes ( & decl , NULL_TREE , 0 ) ; return decl ; }
Make a definition for a builtin function named NAME in the current
namespace, whose data type is TYPE and whose context is CONTEXT.
Make a definition for a builtin function named NAME in the current namespace whose data type is TYPE and whose context is CONTEXT .
/* Since `pushdecl' relies on DECL_ASSEMBLER_NAME instead of DECL_NAME,
     we cannot change DECL_ASSEMBLER_NAME until we have installed this
     function in the namespace.  */ /* A function in the user's namespace should have an explicit
     declaration before it is used.  Mark the built-in function as
     anticipated but not actually declared.  */ /* Possibly apply some default attributes to this built-in function.  */