This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Uninitialized error with GCC mainline
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Fri, 3 Mar 2017 01:55:31 +0000
- Subject: Uninitialized error with GCC mainline
- Authentication-results: sourceware.org; auth=none
As shown at
<https://sourceware.org/ml/libc-testresults/2017-q1/msg00210.html>,
building with GCC mainline fails with an uninitialized variable error on
many (all?) architectures:
In file included from fnmatch.c:250:0:
fnmatch_loop.c: In function 'internal_fnwmatch':
../locale/weightwc.h:103:28: error: '*((void *)&str+4)' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
if (cp[nhere - 1] > usrc[nhere -1])
~~~~^~~~~~~~~~
Building with GCC r245852 fails; building with GCC r245811, as in the
previous build results
<https://sourceware.org/ml/libc-testresults/2017-q1/msg00204.html>, passes
with current glibc. So this results from some GCC change, not a glibc
change. I haven't bisected to an individual revision. We need to figure
out if this is a compiler bug, or a glibc bug, or a case where in fact the
uninitialized use cannot occur but the compiler reasonably cannot see it,
in which case diagnostic pragmas should be used as elsewhere in this file.
--
Joseph S. Myers
joseph@codesourcery.com