From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32060 invoked by alias); 19 Aug 2011 22:43:58 -0000 Received: (qmail 32052 invoked by uid 22791); 19 Aug 2011 22:43:57 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yi0-f47.google.com (HELO mail-yi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Aug 2011 22:43:36 +0000 Received: by yia28 with SMTP id 28so2634109yia.20 for ; Fri, 19 Aug 2011 15:43:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.21.1 with SMTP id y1mr369383ybi.10.1313793815214; Fri, 19 Aug 2011 15:43:35 -0700 (PDT) Received: by 10.151.12.8 with HTTP; Fri, 19 Aug 2011 15:43:35 -0700 (PDT) In-Reply-To: References: <59662D5BB74CD84D9FA8E6491ADB51A7DEAE4D4D@US01WXMBX1.internal.synopsys.com> Date: Fri, 19 Aug 2011 22:43:00 -0000 Message-ID: Subject: Re: Bootstrap with -Wmissing-prototypes doesn't work for C++ From: Gabriel Dos Reis To: Ian Lance Taylor Cc: "H.J. Lu" , Joe Buck , GCC Development Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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/msg00359.txt.bz2 On Fri, Aug 19, 2011 at 4:45 PM, Ian Lance Taylor wrote: > "H.J. Lu" writes: > >> [hjl@gnu-33 gcc]$ cat x.c >> int >> foo (int x) >> { >> =A0 return x; >> } >> [hjl@gnu-33 gcc]$ ./xgcc -B./ -S -O -Wmissing-prototypes x.c >> x.c:2:1: warning: no previous prototype for =91foo=92 [-Wmissing-prototy= pes] >> [hjl@gnu-33 gcc]$ ./g++ -B./ -S -O -Wmissing-prototypes x.c >> cc1plus: warning: command line option =91-Wmissing-prototypes=92 is valid >> for Ada/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? > > This is a minor missing feature, yes. =A0We ought to implement > -Wmissing-prototypes for C++. > what would it do? There is no notion of `prototype' in C++ (as C programmers understand it). So, what would it mean to warn about something we can't take the negation of? ;-) -- Gaby