Bootstrap with -Wmissing-prototypes doesn't work for C++
H.J. Lu
hjl.tools@gmail.com
Fri Aug 19 21:58:00 GMT 2011
On Fri, Aug 19, 2011 at 2: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++.
>
I opened:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50134
--
H.J.
More information about the Gcc
mailing list