Commit 7d429c41 by Richard Stallman

(compile_file): If warning about a function

declared static but not defined, make the function extern.

From-SVN: r3859
parent b292ed86
......@@ -1887,7 +1887,14 @@ compile_file (name)
&& DECL_INITIAL (decl) == 0
&& DECL_EXTERNAL (decl)
&& ! TREE_PUBLIC (decl))
pedwarn_with_decl (decl, "`%s' declared `static' but never defined");
{
pedwarn_with_decl (decl,
"`%s' declared `static' but never defined");
/* This symbol is effectively an "extern" declaration now. */
TREE_PUBLIC (decl) = 1;
assemble_external (decl);
}
/* Warn about static fns or vars defined but not used,
but not about inline functions
since unused inline statics is normal practice. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment