[PATCH 7/7] enable -Wwrite-strings for gas
Trevor Saunders
tbsaunde@tbsaunde.org
Fri Apr 1 12:17:00 GMT 2016
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
>
More information about the Binutils
mailing list