This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Uninitialized error with GCC mainline


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]