contrib/gcc/cp/decl.c
/* Generate an initializer for a function naming variable from
   NAME. NAME may be NULL, to indicate a dependent name.  TYPE_P is
   filled in with the type of the init.  */
Generate an initializer for a function naming variable from
NAME. NAME may be NULL, to indicate a dependent name.  TYPE_P is
filled in with the type of the init.
Generate an initializer for a function naming variable from NAME . NAME may be NULL to indicate a dependent name . TYPE_P is filled in with the type of the init .
tree
cp_fname_init (const char* name, tree *type_p)
{
  tree domain = NULL_TREE;
  tree type;
  tree init = NULL_TREE;
  size_t length = 0;
  if (name)
    {
      length = strlen (name);
      domain = build_index_type (size_int (length));
      init = build_string (length + 1, name);
    }
  type = build_qualified_type (char_type_node, TYPE_QUAL_CONST);
  type = build_cplus_array_type (type, domain);
  *type_p = type;
  if (init)
    TREE_TYPE (init) = type;
  else
    init = error_mark_node;
  return init;
}
tree cp_fname_init ( const char * name , tree * type_p ) { tree domain = NULL_TREE ; tree type ; tree init = NULL_TREE ; size_t length = 0 ; if ( name ) { length = strlen ( name ) ; domain = build_index_type ( size_int ( length ) ) ; init = build_string ( length + 1 , name ) ; } type = build_qualified_type ( char_type_node , TYPE_QUAL_CONST ) ; type = build_cplus_array_type ( type , domain ) ; * type_p = type ; if ( init ) TREE_TYPE ( init ) = type ; else init = error_mark_node ; return init ; }
Generate an initializer for a function naming variable from
NAME.
Generate an initializer for a function naming variable from NAME .