diff options
author | Richard Stallman <rms@gnu.org> | 1992-07-05 21:12:43 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-07-05 21:12:43 +0000 |
commit | 960a2eb1d1941a46912d8fab832f7ff07c142256 (patch) | |
tree | 3a9e58446f104f17444efe99e5762ca186e2ffea | |
parent | d3d6669e17de7aa0c7d5bf32954fc1fa7d70606e (diff) | |
download | gcc-960a2eb1d1941a46912d8fab832f7ff07c142256.zip gcc-960a2eb1d1941a46912d8fab832f7ff07c142256.tar.gz gcc-960a2eb1d1941a46912d8fab832f7ff07c142256.tar.bz2 |
(duplicate_decls): Don't warn about disagreement in `inline' except when...
(duplicate_decls): Don't warn about disagreement in `inline'
except when non-inline fn is made inline after a call or definition.
(finish_function): Set BLOCK_SUPERCONTEXT of outer block.
From-SVN: r1449
-rw-r--r-- | gcc/c-decl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 57b3c1a..f5a996a 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1391,10 +1391,10 @@ duplicate_decls (newdecl, olddecl) warning_with_decl (newdecl, "`%s' declared inline after being called"); if (TREE_CODE (olddecl) == FUNCTION_DECL - && TREE_INLINE (olddecl) != TREE_INLINE (newdecl) - && ! (TREE_EXTERNAL (olddecl) && TREE_EXTERNAL (newdecl))) + && ! TREE_INLINE (olddecl) && TREE_INLINE (newdecl) + && DECL_INITIAL (olddecl) != 0) warning_with_decl (newdecl, - "`%s' declarations disagree about `inline'"); + "`%s' declared inline after its definition"); /* It is nice to warn when a function is declared global first and then static. */ if (TREE_CODE (olddecl) == FUNCTION_DECL @@ -5754,6 +5754,7 @@ finish_function (nested) which then got a warning when stored in a ptr-to-function variable. */ poplevel (1, 0, 1); + BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; /* Must mark the RESULT_DECL as being in this function. */ |