From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15163 invoked by alias); 19 Aug 2011 20:35:36 -0000 Received: (qmail 14955 invoked by uid 22791); 19 Aug 2011 20:35:35 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Aug 2011 20:35:19 +0000 X-Loopcount0: from 10.170.28.39 From: To: , CC: Date: Fri, 19 Aug 2011 20:35:00 -0000 Subject: RE: Bootstrap with -Wmissing-prototypes doesn't work for C++ Message-ID: <09787EF419216C41A903FD14EE5506DD015205AB98@AUSX7MCPC103.AMER.DELL.COM> References: <59662D5BB74CD84D9FA8E6491ADB51A7DEAE4D4D@US01WXMBX1.internal.synopsys.com> In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg00353.txt.bz2 I think the point is that the effect of -Wmissing-prototypes is always enab= led in C++, so that switch is rejected. The solution would seem to be to r= emove that switch from the command line if C++ is used to build; that will = produce the intended result. paul -----Original Message----- From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of H.J= . Lu Sent: Friday, August 19, 2011 3:34 PM To: Joe Buck Cc: GCC Development Subject: Re: Bootstrap with -Wmissing-prototypes doesn't work for C++ [hjl@gnu-33 gcc]$ cat x.c int foo (int x) { return x; } [hjl@gnu-33 gcc]$ ./xgcc -B./ -S -O -Wmissing-prototypes x.c x.c:2:1: warning: no previous prototype for 'foo' [-Wmissing-prototypes] [hjl@gnu-33 gcc]$ ./g++ -B./ -S -O -Wmissing-prototypes x.c cc1plus: warning: command line option '-Wmissing-prototypes' is valid for A= da/AdaWhy/C/ObjC but not for C++ [enabled by default] [hjl@gnu-33 gcc]$ ./g++ -B./ -S -O x.c [hjl@gnu-33 gcc]$ Is this a bug? On Fri, Aug 19, 2011 at 12:24 PM, Joe Buck wrote: > I'm confused. Since C++ treats the lack of a prototype as a hard error, w= hat does it mean to make -Wmissing-prototypes useless? > > ________________________________________ > From: gcc-owner@gcc.gnu.org [gcc-owner@gcc.gnu.org] On Behalf Of H.J.=20 > Lu [hjl.tools@gmail.com] > Sent: Friday, August 19, 2011 9:36 AM > To: GCC Development > Subject: Bootstrap with -Wmissing-prototypes doesn't work for C++ > > Since -Wmissing-prototypes doesn't work for C++, using > C++ to bootstrap GCC makes -Wmissing-prototypes useless. > You will see the -Wmissing-prototypes message in stage 1, but you=20 > won't see it in stage3 2/3. > > -- > H.J. -- H.J.