while I was building the latest gdb Read-write CVS checkout version my build failed. These were my building steps. 1) objdir$ ./../src/configure --prefix=/home/mbilal/commit-gdb-cvs/installdir 2) objdir$ make but after the make I got errors (following is the log) -MF .deps/py-framefilter.Tpo -fno-strict-aliasing -DNDEBUG -fwrapv .././../src/gdb/python/py-framefilter.c In file included from .././../src/gdb/python/py-framefilter.c:24:0: .././../src/gdb/python/py-framefilter.c: In function ‘enumerate_locals’: .././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized] EXCEPTIONS_SIGJMP_BUF *buf = \ ^ .././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here EXCEPTIONS_SIGJMP_BUF *buf = \ ^ .././../src/gdb/python/py-framefilter.c:839:7: note: in expansion of macro ‘TRY_CATCH’ TRY_CATCH (except, RETURN_MASK_ALL) ^ .././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized] EXCEPTIONS_SIGJMP_BUF *buf = \ ^ .././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here EXCEPTIONS_SIGJMP_BUF *buf = \ ^ .././../src/gdb/python/py-framefilter.c:782:7: note: in expansion of macro ‘TRY_CATCH’ TRY_CATCH (except, RETURN_MASK_ALL) ^ .././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized] EXCEPTIONS_SIGJMP_BUF *buf = \ ^ .././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here EXCEPTIONS_SIGJMP_BUF *buf = \ ^ .././../src/gdb/python/py-framefilter.c:762:4: note: in expansion of macro ‘TRY_CATCH’ TRY_CATCH (except, RETURN_MASK_ALL) ^ .././../src/gdb/python/py-framefilter.c:732:23: error: ‘locals_cleanups’ may be used uninitialized in this function [-Werror=maybe-uninitialized] struct cleanup *locals_cleanups; ^ .././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] int local_indent = 8 + (8 * indent); ^ cc1: all warnings being treated as errors make[2]: *** [py-framefilter.o] Error 1 make[2]: Leaving directory `/home/mbilal/commit-gdb-cvs/objdir/gdb' make[1]: *** [all-gdb] Error 2 make[1]: Leaving directory `/home/mbilal/commit-gdb-cvs/objdir' make: *** [all] Error 2
Cannot reproduce in my part. ubuntu 12.04 ../src/configure --disable-sid --disable-rda --disable-gdbtk --disable-tk --disable-itcl --disable-tcl --disable-libgui --enable-targets=x86_64-linux,arm-linux,mips-linux --enable-64-bit-bfd --with-sysroot=/
We discussed this a little on IRC. hmb is going to try with a newer experimental GCC build than he has now which is: $ gcc --version gcc (GCC) 4.9.0 20130507 (experimental) I cannot reproduce on Fedora 18, and Jan also cannot with a GCC build from yesterday (though I think Jan built without Python). But something looks really bogus with errors like: .././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] int local_indent = 8 + (8 * indent); I am not sure how that ever can be uninitialized.
I got the same error with gcc --version gcc (GCC) 4.9.0 20130513 (experimental) with building step $CC="/home/mbilal/gcc-svn/install/bin/gcc" ./../src/configure --prefix=/home/mbilal/commit-gdb-cvs/install $make
All these warnings are around setjmp/long. E.g, with: .././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] int local_indent = 8 + (8 * indent); local_indent is only used in a TRY_CATCH block, meaning, after a setjmp. I strongly suspect this to be related to this recent setjmp gcc change: http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00344.html Please file a gcc bug, and post the link here.
BTW, > 2) objdir$ make I suspect that the build just stopped for you on the first error of this sort, but that could be many more. Try "make -k".
I file a bug on gcc bugzilla http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287
fixed http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287