aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-07-29 19:10:55 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-07-29 17:10:55 +0000
commit54dfd46bffb35c49935053bd9bc2997f77e26902 (patch)
treeec580272d62cb4f74dab5323db176f00f81fd545 /gcc/c-decl.c
parentce94d3547f81cc3dd105f4a3377e72cdbd2bbd2c (diff)
downloadgcc-54dfd46bffb35c49935053bd9bc2997f77e26902.zip
gcc-54dfd46bffb35c49935053bd9bc2997f77e26902.tar.gz
gcc-54dfd46bffb35c49935053bd9bc2997f77e26902.tar.bz2
c-decl.c (merge_decls): Do not handle DECL_INLINE.
* c-decl.c (merge_decls): Do not handle DECL_INLINE. (grokdeclarator): Likewise. * langhooks.c (lhd_warn_unused_global_decl): Use DECL_DECLARED_INLINE_P. * print-tree.c (print_node): Remove DECL_INLINE check. From-SVN: r138258
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 7929aa8..ff23f6e 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1786,7 +1786,6 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
(*debug_hooks->outlining_inline_function) (olddecl);
/* The new defn must not be inline. */
- DECL_INLINE (newdecl) = 0;
DECL_UNINLINABLE (newdecl) = 1;
}
else
@@ -1841,22 +1840,10 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
gimple_set_body (newdecl, gimple_body (olddecl));
DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
- /* Set DECL_INLINE on the declaration if we've got a body
- from which to instantiate. */
- if (DECL_INLINE (olddecl) && !DECL_UNINLINABLE (newdecl))
- {
- DECL_INLINE (newdecl) = 1;
- DECL_ABSTRACT_ORIGIN (newdecl)
- = DECL_ABSTRACT_ORIGIN (olddecl);
- }
- }
- else
- {
- /* If a previous declaration said inline, mark the
- definition as inlinable. */
- if (DECL_DECLARED_INLINE_P (newdecl)
- && !DECL_UNINLINABLE (newdecl))
- DECL_INLINE (newdecl) = 1;
+ /* See if we've got a function to instantiate from. */
+ if (DECL_SAVED_TREE (olddecl))
+ DECL_ABSTRACT_ORIGIN (newdecl)
+ = DECL_ABSTRACT_ORIGIN (olddecl);
}
}
@@ -4851,19 +4838,8 @@ grokdeclarator (const struct c_declarator *declarator,
pedwarn (0, "cannot inline function %<main%>");
}
else if (declspecs->inline_p)
- {
- /* Record that the function is declared `inline'. */
- DECL_DECLARED_INLINE_P (decl) = 1;
-
- /* Do not mark bare declarations as DECL_INLINE. Doing so
- in the presence of multiple declarations can result in
- the abstract origin pointing between the declarations,
- which will confuse dwarf2out. */
- if (initialized)
- DECL_INLINE (decl) = 1;
- }
- else if (initialized)
- DECL_INLINE (decl) = 1;
+ /* Record that the function is declared `inline'. */
+ DECL_DECLARED_INLINE_P (decl) = 1;
}
else
{