public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Ian Lance Taylor <iant@google.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>, Joe Buck <Joe.Buck@synopsys.com>,
		GCC Development <gcc@gcc.gnu.org>
Subject: Re: Bootstrap with -Wmissing-prototypes doesn't work for C++
Date: Fri, 19 Aug 2011 22:43:00 -0000	[thread overview]
Message-ID: <CAAiZkiDOq7KJpDagv74SL8MvQXHsDz1QBjPDK-mHmfPdDgma7g@mail.gmail.com> (raw)
In-Reply-To: <mcrmxf5axdr.fsf@coign.corp.google.com>

On Fri, Aug 19, 2011 at 4:45 PM, Ian Lance Taylor <iant@google.com> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> [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 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.  We 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

  parent reply	other threads:[~2011-08-19 22:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 16:36 H.J. Lu
2011-08-19 19:25 ` Joe Buck
2011-08-19 19:34   ` H.J. Lu
2011-08-19 20:35     ` Paul_Koning
2011-08-19 20:42       ` H.J. Lu
2011-08-19 21:45     ` Ian Lance Taylor
2011-08-19 21:58       ` H.J. Lu
2011-08-19 22:43       ` Gabriel Dos Reis [this message]
2011-08-20  4:18         ` Ian Lance Taylor
2011-08-20  5:20           ` Gabriel Dos Reis
2011-08-20 14:21             ` Ian Lance Taylor
2011-08-21 23:48               ` Joe Buck
2011-08-19 21:47   ` Marc Glisse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAiZkiDOq7KJpDagv74SL8MvQXHsDz1QBjPDK-mHmfPdDgma7g@mail.gmail.com \
    --to=gdr@integrable-solutions.net \
    --cc=Joe.Buck@synopsys.com \
    --cc=gcc@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=iant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).