FreeBSD/contrib/gcc/c-common.c
/* Return the VAR_DECL for a const char array naming the current
   function. If the VAR_DECL has not yet been created, create it
   now. RID indicates how it should be formatted and IDENTIFIER_NODE
   ID is its name (unfortunately C and C++ hold the RID values of
   keywords in different places, so we can't derive RID from ID in
   this language independent code.  */
Return the VAR_DECL for a const char array naming the current
function. If the VAR_DECL has not yet been created, create it
now. RID indicates how it should be formatted and IDENTIFIER_NODE
ID is its name (unfortunately C and C++ hold the RID values of
keywords in different places, so we can't derive RID from ID in
this language independent code.
Return the VAR_DECL for a const char array naming the current function . If the VAR_DECL has not yet been created create it now . RID indicates how it should be formatted and IDENTIFIER_NODE ID is its name ( unfortunately C and C ++ hold the RID values of keywords in different places so we can ' t derive RID from ID in this language independent code .
tree
fname_decl (unsigned int rid, tree id)
{
  unsigned ix;
  tree decl = NULL_TREE;
  for (ix = 0; fname_vars[ix].decl; ix++)
    if (fname_vars[ix].rid == rid)
      break;
  decl = *fname_vars[ix].decl;
  if (!decl)
    {
      tree stmts;
      location_t saved_location = input_location;
#ifdef USE_MAPPED_LOCATION
      input_location = UNKNOWN_LOCATION;
#else
      input_line = 0;
#endif
      stmts = push_stmt_list ();
      decl = (*make_fname_decl) (id, fname_vars[ix].pretty);
      stmts = pop_stmt_list (stmts);
      if (!IS_EMPTY_STMT (stmts))
	saved_function_name_decls
	  = tree_cons (decl, stmts, saved_function_name_decls);
      *fname_vars[ix].decl = decl;
      input_location = saved_location;
    }
  if (!ix && !current_function_decl)
    pedwarn ("%qD is not defined outside of function scope", decl);
  return decl;
}
tree fname_decl ( unsigned int rid , tree id ) { unsigned ix ; tree decl = NULL_TREE ; for ( ix = 0 ; fname_vars [ ix ] . decl ; ix ++ ) if ( fname_vars [ ix ] . rid == rid ) break ; decl = * fname_vars [ ix ] . decl ; if ( ! decl ) { tree stmts ; location_t saved_location = input_location ; #ifdef USE_MAPPED_LOCATION input_location = UNKNOWN_LOCATION ; #else input_line = 0 ; #endif stmts = push_stmt_list ( ) ; decl = ( * make_fname_decl ) ( id , fname_vars [ ix ] . pretty ) ; stmts = pop_stmt_list ( stmts ) ; if ( ! IS_EMPTY_STMT ( stmts ) ) saved_function_name_decls = tree_cons ( decl , stmts , saved_function_name_decls ) ; * fname_vars [ ix ] . decl = decl ; input_location = saved_location ; } if ( ! ix && ! current_function_decl ) pedwarn ( " " , decl ) ; return decl ; }
Return the VAR_DECL for a const char array naming the current
function.
Return the VAR_DECL for a const char array naming the current function .
/* If a tree is built here, it would normally have the lineno of
	 the current statement.  Later this tree will be moved to the
	 beginning of the function and this line number will be wrong.
	 To avoid this problem set the lineno to 0 here; that prevents
	 it from appearing in the RTL.  */