public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/43728] New: Warning for redundant static function prototypes Date: Mon, 12 Apr 2010 15:06:00 -0000 [thread overview] Message-ID: <bug-43728-87@http.gcc.gnu.org/bugzilla/> (raw) Prototypes for static functions that aren't used in between the prototype and the actual static function definition are useless and could be cleaned up, I think gcc itself has thousands of such useless prototypes. It isn't hard to add a warning for this. Given: static void foo (int); #ifdef D void bar (void) { foo (0); } #endif static void foo (int x) { x++; } void baz (void) { foo (0); } we'd warn about the foo prototype (unless compiling with -DD). -- Summary: Warning for redundant static function prototypes Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43728
next reply other threads:[~2010-04-12 15:06 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-04-12 15:06 jakub at gcc dot gnu dot org [this message] 2010-04-12 15:15 ` [Bug c/43728] " jakub at gcc dot gnu dot org 2010-04-12 15:16 ` jakub at gcc dot gnu dot org 2010-04-12 15:38 ` manu at gcc dot gnu dot org 2010-04-12 16:17 ` jason at gcc dot gnu dot org 2010-04-12 16:29 ` jakub at gcc dot gnu dot org 2010-04-14 16:06 ` jakub at gcc dot gnu dot org 2010-04-14 20:26 ` jason at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-43728-87@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).