OSDN Git Service

Add framework support for darwin.
[pf3gnuchains/gcc-fork.git] / gcc / c-decl.c
index 87d24a9..1145363 100644 (file)
@@ -611,7 +611,7 @@ poplevel (int keep, int dummy ATTRIBUTE_UNUSED, int functionbody)
              && DECL_NAME (p)
              && !DECL_ARTIFICIAL (p))
            warning ("%Junused variable `%D'", p, p);
-         /* fall through */
+         /* Fall through.  */
 
        default:
        normal:
@@ -794,7 +794,7 @@ match_builtin_function_types (tree newtype, tree oldtype)
 
 /* Subroutine of diagnose_mismatched_decls.  Check for function type
    mismatch involving an empty arglist vs a nonempty one and give clearer
-   diagnostics. */
+   diagnostics.  */
 static void
 diagnose_arglist_conflict (tree newdecl, tree olddecl,
                           tree newtype, tree oldtype)
@@ -970,7 +970,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
            {
              /* If types don't match for a built-in, throw away the
                 built-in.  No point in calling locate_old_decl here, it
-                won't print anything. */
+                won't print anything.  */
              warning ("%Jconflicting types for built-in function '%D'",
                       newdecl, newdecl);
              return false;
@@ -1016,7 +1016,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
   if (TREE_CODE (newdecl) == TYPE_DECL)
     {
       if (DECL_IN_SYSTEM_HEADER (newdecl) || DECL_IN_SYSTEM_HEADER (olddecl))
-       return true;  /* allow OLDDECL to continue in use */
+       return true;  /* Allow OLDDECL to continue in use.  */
       
       error ("%Jredefinition of typedef '%D'", newdecl, newdecl);
       locate_old_decl (olddecl, error);
@@ -1441,7 +1441,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
        {
          DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
          DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
-         DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
+         DECL_STRUCT_FUNCTION (newdecl) = DECL_STRUCT_FUNCTION (olddecl);
          DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
          DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
 
@@ -2056,12 +2056,13 @@ define_label (location_t location, tree name)
   return label;
 }
 \f
-/* Return the list of declarations of the current scope.  */
+/* Return the list of declarations of the current scope.
+   This hook is optional and not implemented for C.  */
 
 tree
 getdecls (void)
 {
-  return current_scope->names;
+  return 0;
 }
 
 \f
@@ -6065,8 +6066,9 @@ finish_function (void)
       && current_function_returns_null)
     warning ("this function may return with or without a value");
 
-  /* We're leaving the context of this function, so zap cfun.  It's still in
-     DECL_SAVED_INSNS, and we'll restore it in tree_rest_of_compilation.  */
+  /* We're leaving the context of this function, so zap cfun.
+     It's still in DECL_STRUCT_FUNCTION , and we'll restore it in
+     tree_rest_of_compilation.  */
   cfun = NULL;
 
   /* ??? Objc emits functions after finalizing the compilation unit.
@@ -6078,26 +6080,6 @@ finish_function (void)
   current_function_decl = NULL;
 }
 
-/* Generate the RTL for a deferred function FNDECL.  */
-
-void
-c_expand_deferred_function (tree fndecl)
-{
-  /* DECL_INLINE or DECL_RESULT might got cleared after the inline
-     function was deferred, e.g. in duplicate_decls.  */
-  if (DECL_INLINE (fndecl) && DECL_RESULT (fndecl))
-    {
-      if (flag_inline_trees)
-       {
-         timevar_push (TV_INTEGRATION);
-         optimize_inline_calls (fndecl);
-         timevar_pop (TV_INTEGRATION);
-       }
-      c_expand_body (fndecl);
-      current_function_decl = NULL;
-    }
-}
-
 /* Generate the RTL for the body of FNDECL.  If NESTED_P is nonzero,
    then we are already in the process of generating RTL for another
    function.  */
@@ -6197,7 +6179,7 @@ check_for_loop_decls (void)
         }
     }
 
-  for (t = getdecls (); t; t = TREE_CHAIN (t))
+  for (t = current_scope->names; t; t = TREE_CHAIN (t))
     {
       if (TREE_CODE (t) != VAR_DECL && DECL_NAME (t))
        error ("%Jdeclaration of non-variable '%D' in 'for' loop "
@@ -6239,7 +6221,7 @@ c_pop_function_context (struct function *f)
 {
   struct language_function *p = f->language;
 
-  if (DECL_SAVED_INSNS (current_function_decl) == 0
+  if (DECL_STRUCT_FUNCTION (current_function_decl) == 0
       && DECL_SAVED_TREE (current_function_decl) == NULL_TREE)
     {
       /* Stop pointing to the local nodes about to be freed.  */
@@ -6380,11 +6362,14 @@ void
 record_builtin_type (enum rid rid_index, const char *name, tree type)
 {
   tree id;
+  tree tdecl;
   if (name == 0)
     id = ridpointers[(int) rid_index];
   else
     id = get_identifier (name);
-  pushdecl (build_decl (TYPE_DECL, id, type));
+  tdecl = build_decl (TYPE_DECL, id, type);
+  pushdecl (tdecl);
+  debug_hooks->type_decl (tdecl, 0);
 }
 
 /* Build the void_list_node (void_type_node having been created).  */