From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9749 invoked by alias); 26 Sep 2005 19:24:32 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9740 invoked by uid 48); 26 Sep 2005 19:24:29 -0000 Date: Mon, 26 Sep 2005 19:24:00 -0000 From: "dann at godzilla dot ics dot uci dot edu" To: gcc-bugs@gcc.gnu.org Message-ID: <20050926192427.24068.dann@godzilla.ics.uci.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/24068] New: Unconditional warning when using -fwhole-program X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg03090.txt.bz2 List-Id: When trying to compile the attached preprocessed files using gcc -c -fwhole-program --combine xterm.i xlwmenu.i These warnings are produced unconditionally: /home/dann/build/Emacs-CVS/emacs/lwlib/xlwmenu.c:57: warning: prototype for 'x_alloc_nearest_color_for_widget' follows non-prototype definition /home/dann/build/Emacs-CVS/emacs/lwlib/xlwmenu.c:58: warning: prototype for 'x_alloc_lighter_color_for_widget' follows non-prototype definition /home/dann/build/Emacs-CVS/emacs/lwlib/xlwmenu.c:64: warning: prototype for 'x_clear_errors' follows non-prototype definition /home/dann/build/Emacs-CVS/emacs/lwlib/xlwmenu.c:65: warning: prototype for 'x_copy_dpy_color' follows non-prototype definition AFAICT the warnings don't make much sense. The code is correct. The functions in questions are defined in one file and then prototyped and used in the other file. This kind of stuff appears in countless C programs. Can this warning be turned off by default? -- Summary: Unconditional warning when using -fwhole-program Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dann at godzilla dot ics dot uci dot edu CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24068