This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 7/7] enable -Wwrite-strings for gas
- From: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: tbsaunde+binutils at tbsaunde dot org, binutils at sourceware dot org
- Date: Fri, 1 Apr 2016 08:20:33 -0400
- Subject: Re: [PATCH 7/7] enable -Wwrite-strings for gas
- Authentication-results: sourceware.org; auth=none
- References: <1459300381-19313-1-git-send-email-tbsaunde+binutils at tbsaunde dot org> <1459300381-19313-8-git-send-email-tbsaunde+binutils at tbsaunde dot org> <56FE59CA dot 2040908 at foss dot arm dot com>
On Fri, Apr 01, 2016 at 12:21:46PM +0100, Jiong Wang wrote:
>
> On 30/03/16 02:13, tbsaunde+binutils@tbsaunde.org wrote:
> >From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> >We add a new AC_SUBST to warning.m4 so that the test if the warning is
> >supported is centralized, but the warning can be enabled per directory.
> >
> >binutils/ChangeLog:
> >
> >2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> > * configure: Regenerate.
> >
> >gprof/ChangeLog:
> >
> >2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> > * configure: Regenerate.
> >
> >ld/ChangeLog:
> >
> >2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> > * configure: Regenerate.
> >
> >opcodes/ChangeLog:
> >
> >2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> > * configure: Regenerate.
> >
> >bfd/ChangeLog:
> >
> >2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> > * configure: Regenerate.
> > * warning.m4: Add WARN_WRITE_STRINGS AC_SUBST.
> >
> >gold/ChangeLog:
> >
> >2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> > * configure: Regenerate.
> >
> >gas/ChangeLog:
> >
> >2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
> >
> > * Makefile.am: Add WARN_WRITE_STRINGS to WARN_CFLAGS.
> > * Makefile.in: Regenerate.
> > * configure: Likewise.
>
>
> This caused build failures when binutils-gdb is configured with
> --disable-nls, for example:
>
> ../configure --disable-nls
> make
>
>
> ../../binutils-gdb-commit/gas/expr.c: In function âexprâ:
> ../../binutils-gdb-commit/gas/expr.c:1919:8: error: passing argument 1 of
> âas_warn_value_out_of_rangeâ discards âconstâ qualifier from pointer target
> type [-Werror]
> NULL, 0);
bleh, it looks like asintl.h does
#define _(string) (string)
which isn't compatible with the standard prototype of gettext(). I
expect adding a cast there should fix it, though maybe you need to fix a
couple other macros there? I'll start testing that in a few minutes.
sorry about the breakage.
Trev
>