https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43728
Eric Gallager changed:
What|Removed |Added
Status|NEW |WAITING
--- Comment #9 from Eric Gallage
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43728
Eric Gallager changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
--- Comment #7 from jason at gcc dot gnu dot org 2010-04-14 20:26 ---
Presumably TREE_USED isn't set on the global declaration because the call uses
the local one. And the local declaration might not be redundant if the
programmer is using it to suppress argument-dependent lookup.
--
--- Comment #6 from jakub at gcc dot gnu dot org 2010-04-14 16:06 ---
Created an attachment (id=20378)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20378&action=view)
gcc46-pr43728.patch
Updated patch. There are still cases I'm unsure about. E.g. for:
static void g ();
void f
--- Comment #5 from jakub at gcc dot gnu dot org 2010-04-12 16:29 ---
-Wredundant-decls is a non-default warning already, not enabled with -Wall nor
-W and I certainly don't want to enable it by default.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43728
--- Comment #4 from jason at gcc dot gnu dot org 2010-04-12 16:16 ---
...and then after removing the prototype, compiling with -DD would fail. I
don't object to having such a flag, but I don't think we want it in -Wall.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43728
--- Comment #3 from manu at gcc dot gnu dot org 2010-04-12 15:38 ---
If you are going to add such a warning, please be more explicit. I suggest:
"redundant prototype for static function %qD because it is never used before
its definition"
--
manu at gcc dot gnu dot org changed:
--- Comment #2 from jakub at gcc dot gnu dot org 2010-04-12 15:16 ---
*** Bug 36195 has been marked as a duplicate of this bug. ***
--
jakub at gcc dot gnu dot org changed:
What|Removed |Added
---
--- Comment #1 from jakub at gcc dot gnu dot org 2010-04-12 15:14 ---
Created an attachment (id=20367)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20367&action=view)
gcc46-pr43728.patch
Quick patch, so far without documentation and testsuite and almost untested.
--
http://g