This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: build gdbserver with -Werror by default
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Date: Fri, 27 Aug 2010 10:50:05 -0400
- Subject: Re: build gdbserver with -Werror by default
- References: <201008261917.51934.pedro@codesourcery.com> <001e01cb45c5$a6b53b40$f41fb1c0$@muller@ics-cnrs.unistra.fr> <201008271129.08333.pedro@codesourcery.com>
On Fri, Aug 27, 2010 at 11:29:08AM +0100, Pedro Alves wrote:
> and it'd fail elsewhere if it kept going, most probably. GDB has
> a bunch of suspicious code like this as well (e.g., in remote.c), so it
> ended up with -Wno-char-subscripts. I didn't bring that warning over to
> gdbserver, as I didn't see any warning when building for linux and
> mingw32, so I thought it was unnecessary (it is probably gcc version
> dependent whether that's part of -Wall). Since this is certainly
> not a new warning (it's the fact that it causes an error that it's new)
> I've now added -Wno-char-subscripts to gdbserver as well...
Having just run into this, not all implementations of the C library
arrange for isdigit et al to report a char-subscript error. The GLIBC
version casts the argument to int; just recently, newlib started
deliberately issuing the error.
--
Daniel Jacobowitz
CodeSourcery