OSDN Git Service

(expand_call): Don't require both -W and -Winline to say that call can't be
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Mar 1994 23:44:26 +0000 (23:44 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Mar 1994 23:44:26 +0000 (23:44 +0000)
inlined.
Warn if inlining is tried but fails.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6905 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/calls.c

index c7a85be..9cf1d92 100644 (file)
@@ -581,9 +581,8 @@ expand_call (exp, target, ignore)
 
                 Use abstraction instead of setting TREE_ADDRESSABLE
                 directly.  */
-             if (DECL_INLINE (fndecl) && extra_warnings && warn_inline
-                 && !flag_no_inline)
-               warning_with_decl (fndecl, "can't inline call to `%s' which was declared inline");
+             if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline)
+               warning_with_decl (fndecl, "can't inline call to `%s'");
              mark_addressable (fndecl);
            }
 
@@ -746,7 +745,11 @@ expand_call (exp, target, ignore)
        }
 
       /* If inlining failed, mark FNDECL as needing to be compiled
-        separately after all.  */
+        separately after all.  If function was declared inline,
+        give a warning.  */
+      if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
+         && ! TREE_ADDRESSABLE (fndecl))
+       warning_with_decl (fndecl, "can't inline call to `%s'");
       mark_addressable (fndecl);
     }