+2016-01-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/66869
+ * decl.c (wrapup_globals_for_namespace): Warn about unused static
+ function declarations.
+
2016-01-29 Marek Polacek <polacek@redhat.com>
PR c++/69509
tree *vec = statics->address ();
int len = statics->length ();
+ if (warn_unused_function)
+ {
+ tree decl;
+ unsigned int i;
+ FOR_EACH_VEC_SAFE_ELT (statics, i, decl)
+ if (TREE_CODE (decl) == FUNCTION_DECL
+ && DECL_INITIAL (decl) == 0
+ && DECL_EXTERNAL (decl)
+ && !TREE_PUBLIC (decl)
+ && !DECL_ARTIFICIAL (decl)
+ && !TREE_NO_WARNING (decl))
+ {
+ warning (OPT_Wunused_function,
+ "%q+F declared %<static%> but never defined", decl);
+ TREE_NO_WARNING (decl) = 1;
+ }
+ }
+
/* Write out any globals that need to be output. */
return wrapup_global_declarations (vec, len);
}
+2016-01-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/66869
+ * g++.dg/warn/Wunused-function2.C: New test.
+
2016-01-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.dg/tree-ssa/ssa-dom-cse-2.c: Require a hardware vector