[Bug binutils/21096] gcc7 warnings

2017-02-03 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

Nick Clifton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Nick Clifton  ---
Patch applied.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21096] gcc7 warnings

2017-02-03 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

--- Comment #7 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1b7e3d2fb7036ce6f9d74e32dc052518f5cd45b6

commit 1b7e3d2fb7036ce6f9d74e32dc052518f5cd45b6
Author: Nick Clifton 
Date:   Fri Feb 3 09:04:21 2017 +

Fix compile time warning messages when compiling binutils with gcc 7.0.1.

PR 21096
bfd * coffcode.h (coff_write_object_contents): Enlarge size of
s_name_buf in order to avoid compile time warning about possible
integer truncation.
* elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
32-bits of insn value before printing into buffer.

opcodes * aarch64-opc.c (print_register_list): Ensure that the register
list index will fir into the tb buffer.
(print_register_offset_address): Likewise.
* tic6x-dis.c (print_insn_tic6x): Increase size of func_unit_buf.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21096] gcc7 warnings

2017-02-02 Thread dilyan.palauzov at aegee dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

--- Comment #6 from dilyan.palauzov at aegee dot org  ---
The second patch eliminates all warnings.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21096] gcc7 warnings

2017-02-02 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

Nick Clifton  changed:

   What|Removed |Added

   Attachment #9787|0   |1
is obsolete||

--- Comment #5 from Nick Clifton  ---
Created attachment 9791
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9791=edit
Proposed patch

Hi Dilyan,

  OK, please try this updated patch and let me know if it gets them all.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21096] gcc7 warnings

2017-02-01 Thread dilyan.palauzov at aegee dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

--- Comment #4 from dilyan.palauzov at aegee dot org  ---
It works, but there is one more warning:

make[4]: Entering directory '/home/d/binutils/opcodes'
/bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I/git/binutils-gdb/opcodes  -I. -I/git/binutils-gdb/opcodes -I../bfd
-I/git/binutils-gdb/opcodes/../include -I/git/binutils-gdb/opcodes/../bfd-W
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144
-Werror -g -O2 -MT tic6x-dis.lo -MD -MP -MF .deps/tic6x-dis.Tpo -c -o
tic6x-dis.lo /git/binutils-gdb/opcodes/tic6x-dis.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/git/binutils-gdb/opcodes -I.
-I/git/binutils-gdb/opcodes -I../bfd -I/git/binutils-gdb/opcodes/../include
-I/git/binutils-gdb/opcodes/../bfd -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -g -O2 -MT
tic6x-dis.lo -MD -MP -MF .deps/tic6x-dis.Tpo -c
/git/binutils-gdb/opcodes/tic6x-dis.c -o tic6x-dis.o
/git/binutils-gdb/opcodes/tic6x-dis.c: In function ‘print_insn_tic6x’:
/git/binutils-gdb/opcodes/tic6x-dis.c:706:32: error: ‘snprintf’ output may be
truncated before the last format character [-Werror=format-truncation=]
snprintf (func_unit_buf, 7, " .%c%u%s%s", func_unit_char,
^~~~
/git/binutils-gdb/opcodes/tic6x-dis.c:706:4: note: ‘snprintf’ output between 5
and 8 bytes into a destination of size 7
snprintf (func_unit_buf, 7, " .%c%u%s%s", func_unit_char,
^
   func_unit_side, (func_unit_cross ? "X" : ""), data_str);
   ~~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1003: tic6x-dis.lo] Error 1
make[4]: Target 'all-am' not remade because of errors.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21096] gcc7 warnings

2017-02-01 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

--- Comment #3 from Nick Clifton  ---
(In reply to Alan Modra from comment #2)
> Wouldn't it be better to remove this warning from Werror until and unless
> gcc can be fixed to not give so many false positives?

Overall I think that the warning is useful, and it will certainly help prevent
future bugs of this type.  The fixes I have proposed are quite simple, and
there are only four places where the binutils appear to be affected, so the
price seems quite small to me.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21096] gcc7 warnings

2017-02-01 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #2 from Alan Modra  ---
Wouldn't it be better to remove this warning from Werror until and unless gcc
can be fixed to not give so many false positives?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21096] gcc7 warnings

2017-02-01 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21096

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Created attachment 9787
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9787=edit
Proposed patch

Hi Dilyan,

  Please could you try out this patch and let me know if it works.

  Thanks.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils