This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 0/7] enable -Wwrite-strings for gas
- From: Andrew Pinski <pinskia at gmail dot com>
- To: tbsaunde+binutils at tbsaunde dot org
- Cc: binutils <binutils at sourceware dot org>
- Date: Sun, 1 May 2016 09:44:06 -0700
- Subject: Re: [PATCH 0/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>
On Tue, Mar 29, 2016 at 6:12 PM, <tbsaunde+binutils@tbsaunde.org> wrote:
> From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
>
> Hi,
>
> At this point I think we've fixed basically all the -Wwrite-strings issues in
> gas that can be fixed reasonably without just adding casts. So this series
> adds a handful of casts in several patches that try to explain why those casts
> are necessary, and then enables the warning for gas.
>
> I built one target per tc-*.c and regtested x86_64-linux-gnu, ok?
This patch set broke cross Canadian cross as the build compiler does
not have to be the same as the target compiler version on what options
are supported.
I use gcc 4.4.5 as my build compiler but the target compiler is GCC 7.
Thanks,
Andrew
>
> Trev
>
>
> Trevor Saunders (7):
> cast literal to char * when assigning to input_line_ptr
> work around get_symbol_name () in sparc and ia64
> cast to char * when assigning to optarg
> cast the arg to md_assemble () to char *
> tc-i960.c: add some casts when assigning literals to args[i]
> make xtensa_section_rename () take const char *
> enable -Wwrite-strings for gas
>
> bfd/configure | 20 ++++++++++++++++++--
> bfd/warning.m4 | 4 ++++
> binutils/configure | 20 ++++++++++++++++++--
> gas/Makefile.am | 2 +-
> gas/Makefile.in | 2 +-
> gas/as.c | 2 +-
> gas/config/tc-i960.c | 26 +++++++++++++-------------
> gas/config/tc-ia64.c | 6 ++++--
> gas/config/tc-m32c.c | 8 ++++----
> gas/config/tc-m32r.c | 2 +-
> gas/config/tc-msp430.c | 2 +-
> gas/config/tc-nds32.c | 10 +++++-----
> gas/config/tc-sparc.c | 2 +-
> gas/config/tc-xtensa.c | 6 +++---
> gas/config/tc-xtensa.h | 2 +-
> gas/config/tc-z80.c | 2 +-
> gas/configure | 20 ++++++++++++++++++--
> gas/stabs.c | 2 +-
> gold/configure | 16 ++++++++++++++++
> gprof/configure | 20 ++++++++++++++++++--
> ld/configure | 20 ++++++++++++++++++--
> opcodes/configure | 20 ++++++++++++++++++--
> 22 files changed, 166 insertions(+), 48 deletions(-)
>
> --
> 2.1.4
>