OSDN Git Service

* rtl.h (mem_attrs): Rename decl to expr; adjust all users.
[pf3gnuchains/gcc-fork.git] / gcc / c-decl.c
index f240aac..6747593 100644 (file)
@@ -457,6 +457,7 @@ c_decode_option (argc, argv)
 
   if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
     {
+      warning ("-traditional is deprecated and may be removed");
       flag_traditional = 1;
       flag_writable_strings = 1;
     }
@@ -596,6 +597,8 @@ c_decode_option (argc, argv)
     flag_no_builtin = 0;
   else if (!strcmp (p, "-fno-builtin"))
     flag_no_builtin = 1;
+  else if (!strncmp (p, "-fno-builtin-", strlen ("-fno-builtin-")))
+    disable_builtin_function (p + strlen ("-fno-builtin-"));
   else if (p[0] == '-' && p[1] == 'f' && dump_switch_p (p + 2))
     ;
   else if (!strcmp (p, "-ansi"))
@@ -1618,13 +1621,13 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
              if (TREE_CHAIN (t) == 0
                  && TYPE_MAIN_VARIANT (type) != void_type_node)
                {
-                 error ("A parameter list with an ellipsis can't match an empty parameter name list declaration.");
+                 error ("a parameter list with an ellipsis can't match an empty parameter name list declaration");
                  break;
                }
 
              if (simple_type_promotes_to (type) != NULL_TREE)
                {
-                 error ("An argument type that has a default promotion can't match an empty parameter name list declaration.");
+                 error ("an argument type that has a default promotion can't match an empty parameter name list declaration");
                  break;
                }
            }
@@ -2018,6 +2021,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
          if (! different_binding_level)
            DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
          DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
+         DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
          DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
          if (DECL_INLINE (newdecl))
            DECL_ABSTRACT_ORIGIN (newdecl) = DECL_ABSTRACT_ORIGIN (olddecl);
@@ -3761,7 +3765,7 @@ push_parm_decl (parm)
       olddecl = lookup_name (DECL_NAME (decl));
       if (pedantic && olddecl != 0 && TREE_CODE (olddecl) == TYPE_DECL)
        pedwarn_with_decl (decl,
-                          "ANSI C forbids parameter `%s' shadowing typedef");
+                          "ISO C forbids parameter `%s' shadowing typedef");
     }
 #endif
 
@@ -5296,7 +5300,7 @@ parmlist_tags_warning ()
        }
       if (! already)
        {
-         warning ("its scope is only this definition or declaration, which is probably not what you want.");
+         warning ("its scope is only this definition or declaration, which is probably not what you want");
          already = 1;
        }
     }
@@ -6765,8 +6769,13 @@ void
 c_expand_deferred_function (fndecl)
      tree fndecl;
 {
-  c_expand_body (fndecl, 0, 0);
-  current_function_decl = NULL;
+  /* 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))
+    {
+      c_expand_body (fndecl, 0, 0);
+      current_function_decl = NULL;
+    }
 }
 
 /* Generate the RTL for the body of FNDECL.  If NESTED_P is non-zero,
@@ -6800,7 +6809,7 @@ c_expand_body (fndecl, nested_p, can_defer_p)
              function could not be deferred.  */
          && defer_fn (fndecl))
        {
-         /* Let the back-end know that this funtion exists.  */
+         /* Let the back-end know that this function exists.  */
          (*debug_hooks->deferred_inline_function) (fndecl);
           timevar_pop (TV_INTEGRATION);
          return;