diff options
author | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-10-07 08:36:28 +0000 |
---|---|---|
committer | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-10-07 08:36:28 +0000 |
commit | 09ebcffa1928d6373895c99e3c534f74f3cd126e (patch) | |
tree | db6e52deb02c1ade7f1b93d2927831bdd5399fba /gcc/tree-inline.c | |
parent | 22d66adf5d3947f66386084992dc76ccb4b391d6 (diff) | |
download | gcc-09ebcffa1928d6373895c99e3c534f74f3cd126e.zip gcc-09ebcffa1928d6373895c99e3c534f74f3cd126e.tar.gz gcc-09ebcffa1928d6373895c99e3c534f74f3cd126e.tar.bz2 |
re PR c++/17115 (-Winline does not respect __attribute__((__noinline__)))
PR c++/17115
* tree-inline.c (expand_call_inline): Do not warn for functions
marked with attribute noinline.
PR c++/17115
* g++.dg/warn/Winline-4.C: New test.
From-SVN: r88678
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 38fa455..0583eb4 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1475,7 +1475,8 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) } else if (warn_inline && DECL_DECLARED_INLINE_P (fn) && !DECL_IN_SYSTEM_HEADER (fn) - && strlen (reason)) + && strlen (reason) + && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))) { warning ("%Jinlining failed in call to '%F': %s", fn, fn, reason); warning ("called from here"); |