This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Build issue with latest (prerelease 7.0) GCC
- From: Steve Ellcey <sellcey at caviumnetworks dot com>
- To: libc-alpha <libc-alpha at sourceware dot org>, carlos <carlos at redhat dot com>
- Date: Tue, 31 Jan 2017 08:23:38 -0800
- Subject: Build issue with latest (prerelease 7.0) GCC
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
I just built the latest glibc with the latest (pre-release) GCC 7.0 and
got this build failure:
../sysdeps/posix/tempname.c: In function ‘__path_search’:
../sysdeps/posix/tempname.c:169:24: error: ‘%.*s’ directive output between 0 and
5 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-
overflow=]
sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
^~~~
../sysdeps/posix/tempname.c: In function ‘__path_search’:
../sysdeps/posix/tempname.c:169:24: error: ‘%.*s’ directive output between 0 and
5 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-
overflow=]
sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
^~~~
cc1: all warnings being treated as errors
I am not sure if we want a DIAG_PUSH_NEEDS_COMMENT here or if there is
a way to fix the code but I thought I would at least raise the issue
and see if we want to do anything before the code freeze. I think the
problem only happens with 32 bit builds. I did not see it in my 64 bit
build.
Steve Ellcey
sellcey@cavium.com