From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10484 invoked by alias); 20 Aug 2011 14:21:03 -0000 Received: (qmail 10468 invoked by uid 22791); 20 Aug 2011 14:21:01 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Aug 2011 14:20:47 +0000 Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p7KEKjnd021128 for ; Sat, 20 Aug 2011 07:20:46 -0700 Received: from vxh11 (vxh11.prod.google.com [10.241.34.203]) by hpaq14.eem.corp.google.com with ESMTP id p7KEKhOT022700 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sat, 20 Aug 2011 07:20:44 -0700 Received: by vxh11 with SMTP id 11so5844188vxh.27 for ; Sat, 20 Aug 2011 07:20:43 -0700 (PDT) Received: by 10.220.208.21 with SMTP id ga21mr156511vcb.88.1313850043691; Sat, 20 Aug 2011 07:20:43 -0700 (PDT) Received: by 10.220.208.21 with SMTP id ga21mr156503vcb.88.1313850043414; Sat, 20 Aug 2011 07:20:43 -0700 (PDT) Received: from coign.google.com ([66.205.204.238]) by mx.google.com with ESMTPS id bp11sm2203234vcb.24.2011.08.20.07.20.40 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Aug 2011 07:20:41 -0700 (PDT) From: Ian Lance Taylor To: Gabriel Dos Reis Cc: "H.J. Lu" , Joe Buck , GCC Development Subject: Re: Bootstrap with -Wmissing-prototypes doesn't work for C++ References: <59662D5BB74CD84D9FA8E6491ADB51A7DEAE4D4D@US01WXMBX1.internal.synopsys.com> Date: Sat, 20 Aug 2011 14:21:00 -0000 In-Reply-To: (Gabriel Dos Reis's message of "Sat, 20 Aug 2011 00:19:45 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00366.txt.bz2 Gabriel Dos Reis writes: > On Fri, Aug 19, 2011 at 11:17 PM, Ian Lance Taylor wrot= e: >> Gabriel Dos Reis writes: >> >>> what would it do? =C2=A0There 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? ;-) >> >> -Wmissing-prototypes means that if the compiler sees a globally visible >> function definition, it warns if no previous definition of the function >> was seen. =C2=A0This is a way of ensuring that the file which defines a >> function #includes the header file which declares the function, thus >> ensuring that the definition matches the declaration. =C2=A0Although the= name >> is wrong for C++, the option is meaningful for C++ just as it is for C. > > So that is -Wmissing-declaration if I understand correctly? Hmmm, you're right, -Wmissing-declarations seems to be equivalent to -Wmissing-prototypes when using C++. Sorry I missed that. Ian