+2003-06-20 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/10888
+ * tree-inline.c (expand_call_inline): Do not warn about failing to
+ inline functions declared in system headers.
+ * doc/invoke.texi (-Winline): Expand on documentation.
+
2003-06-20 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_file_start): Disable
@item -Winline
@opindex Winline
Warn if a function can not be inlined and it was declared as inline.
+Even with this option, the compiler will not warn about failures to
+inline functions declared in system headers.
+
+The compiler uses a variety of heuristics to determine whether or not
+to inline a function. For example, the compiler takes into account
+the size of the function being inlined and the the amount of inlining
+that has already been done in the current function. Therefore,
+seemingly insignificant changes in the source program can cause the
+warnings produced by @option{-Winline} to appear or disappear.
@item -Wno-invalid-offsetof @r{(C++ only)}
@opindex Wno-invalid-offsetof
+2003-06-20 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/10888
+ * g++.dg/warn/Winline-3.C: New test.
+
2003-06-20 Mark Mitchell <mark@codesourcery.com>
* lib/target-supports.exp (check_alias_available): Make the test
--- /dev/null
+// { dg-options "-Winline -O" }
+
+#include <vector>
+
+using namespace std;
+
+int main(void)
+{
+ vector<int> v(10);
+}
|| !cgraph_global_info (fn)->inline_once)
&& !inlinable_function_p (fn, id, 0))
{
- if (warn_inline && DECL_INLINE (fn) && !DID_INLINE_FUNC (fn))
+ if (warn_inline && DECL_INLINE (fn) && !DID_INLINE_FUNC (fn)
+ && !DECL_IN_SYSTEM_HEADER (fn))
{
warning_with_decl (fn, "inlining failed in call to `%s'");
warning ("called from here");