From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2816 invoked by alias); 12 Apr 2010 15:06:31 -0000 Received: (qmail 2717 invoked by uid 48); 12 Apr 2010 15:06:15 -0000 Date: Mon, 12 Apr 2010 15:06:00 -0000 Subject: [Bug c/43728] New: Warning for redundant static function prototypes X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg01160.txt.bz2 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