Bug 21935 - gas build error when using gcc 7
Summary: gas build error when using gcc 7
Status: RESOLVED DUPLICATE of bug 21934
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.29
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-09 16:02 UTC by Brett Neumeier
Modified: 2017-08-09 16:38 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Fix a gas build error when using gcc 7 (512 bytes, patch)
2017-08-09 16:02 UTC, Brett Neumeier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Neumeier 2017-08-09 16:02:47 UTC
Created attachment 10332 [details]
Fix a gas build error when using gcc 7

I found this only when doing an ARM-to-x86_64 cross-toolchain build, but
I presume it can occur in other circumstances as well.

When using gcc 7, config/tc-i386.c fails to compile because of a
compiler warning:

In function 'output_invalid':
9719:12: error: '%x' directive output may be truncated writing between 1
and 8 bytes into a region of size 5 [-Werror=format-truncation=]

This is similar to other issues I found corrected in binutils 2.29, e.g.
PR 21096, and I was able to fix it similarly by increasing the size of
the buffer slightly. Patch attached.
Comment 1 Nick Clifton 2017-08-09 16:38:50 UTC
duplicate

*** This bug has been marked as a duplicate of bug 21934 ***