[15/15] Enable -Wmissing-declarations diagnostic
Commit Message
Now that most warnings of this kind are fixed, we can enable
-Wmissing-declarations. I say "most", because it is likely that there
are some more in some configurations I am not able to build, but they
should be pretty easy to fix.
gdb/ChangeLog:
* warning.m4: Add -Wmissing-declarations to build_warnings.
* configure: Re-generate.
Change-Id: Iae9b59f22eb5dd1965d09f34c5c9e212cddf67ba
---
gdb/configure | 3 ++-
gdb/warning.m4 | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
Comments
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
Simon> Now that most warnings of this kind are fixed, we can enable
Simon> -Wmissing-declarations. I say "most", because it is likely that there
Simon> are some more in some configurations I am not able to build, but they
Simon> should be pretty easy to fix.
Simon> gdb/ChangeLog:
Simon> * warning.m4: Add -Wmissing-declarations to build_warnings.
Simon> * configure: Re-generate.
gdbserver uses warning.m4, so you have to also rebuild configure there
and fix up any issues -- otherwise, the next person to rebuild
gdbserver/configure will be surprised.
Tom
On 2019-11-25 5:06 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> Now that most warnings of this kind are fixed, we can enable
> Simon> -Wmissing-declarations. I say "most", because it is likely that there
> Simon> are some more in some configurations I am not able to build, but they
> Simon> should be pretty easy to fix.
>
> Simon> gdb/ChangeLog:
>
> Simon> * warning.m4: Add -Wmissing-declarations to build_warnings.
> Simon> * configure: Re-generate.
>
> gdbserver uses warning.m4, so you have to also rebuild configure there
> and fix up any issues -- otherwise, the next person to rebuild
> gdbserver/configure will be surprised.
Doh. I was really susprised that gdbserver had zero occurence of this warning!
Do patches 2 to 8 and 10 to 14 look ok to you? If so, I would probably push them
right away since I believe they are good cleanups in any case.
Patches 1 and 9 are not really important until we are ready to switch the warning
on.
Simon
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
Simon> Do patches 2 to 8 and 10 to 14 look ok to you? If so, I would probably push them
Simon> right away since I believe they are good cleanups in any case.
Yeah, those all seem fine to me.
thank,
Tom
On 2019-11-26 9:12 a.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> Do patches 2 to 8 and 10 to 14 look ok to you? If so, I would probably push them
> Simon> right away since I believe they are good cleanups in any case.
>
> Yeah, those all seem fine to me.
Thanks, I pushed these.
Simon
@@ -15265,7 +15265,8 @@ build_warnings="-Wall -Wpointer-arith \
-Wshadow=local \
-Wdeprecated-copy \
-Wdeprecated-copy-dtor \
--Wredundant-move"
+-Wredundant-move \
+-Wmissing-declarations"
case "${host}" in
*-*-mingw32*)
@@ -49,7 +49,8 @@ build_warnings="-Wall -Wpointer-arith \
-Wshadow=local \
-Wdeprecated-copy \
-Wdeprecated-copy-dtor \
--Wredundant-move"
+-Wredundant-move \
+-Wmissing-declarations"
case "${host}" in
*-*-mingw32*)