This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit] Build memmem with -Wno-error.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Tue, 31 Aug 2010 20:48:34 +0100
- Subject: Re: [commit] Build memmem with -Wno-error.
- References: <1283281706-30409-1-git-send-email-brobecker@adacore.com>
On Tuesday 31 August 2010 20:08:26, Joel Brobecker wrote:
> +# We build memmem.c with -Wno-error because this file is not under
> +# our control. On LynxOS, the compiler generates some warnings
> +# because str-two-way.h uses a constant (MAX_SIZE) whose definition
> +# makes it ambiguous whether it is signed or unsigned ("warning: this
> +# decimal constant is unsigned only in ISO C90").
> memmem.o: ../gnulib/memmem.c
> - $(CC) -o memmem.o -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $<
> + $(CC) -o memmem.o -c $(CPPFLAGS) $(INTERNAL_CFLAGS) -Wno-error $<
Sorry, I didn't realize you were talking about "-Wno-error" literally.
This may break non-gcc compilers. It would be better to come up with
an $(INTERNAL_CFLAGS) variant that does not include -Werror in the first
place, and use that instead in the memmem.o rule. gdb/Makefile.in uses
INTERNAL_WARN_CFLAGS for exactly that. I suggest to do the same here. Take
a look at the monitor.o rule in gdb/Makefile.in.
--
Pedro Alves