https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84299
Bug ID: 84299
Summary: warning: '<anonymous>' may be used uninitialized in
this function
Product: gcc
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bugzilla at cpockrandt dot de
Target Milestone: ---
The warnings appeared between versions 8.0.1.s20180121 and 8.0.1.s20180128.
The attached *.ii file was produced by g++8 (FreeBSD Ports Collection) 8.0.1
20180128 (experimental)
/usr/local/bin/g++8 -DSEQAN_DISABLE_VERSION_CHECK -DSEQAN_ENABLE_TESTING=1
-DSEQAN_HAS_BZIP2=1 -DSEQAN_HAS_EXECINFO=1 -DSEQAN_HAS_OPENMP=1
-DSEQAN_HAS_ZLIB=1 -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_USE_C99=1
-D_LARGEFILE_SOURCE -I/home/mi/cpockrandt/seqan/include -save-temps -W -Wall
-pedantic -fopenmp -O3 -DSEQAN_GLOBAL_EXCEPTION_HANDLER=1 -o
CMakeFiles/test_index_vstree.dir/test_index_vstree.cpp.o -c
/home/mi/cpockrandt/seqan/tests/index/test_index_vstree.cpp
In file included from
/home/mi/cpockrandt/seqan/include/seqan/basic/basic_iterator.h:80,
from /home/mi/cpockrandt/seqan/include/seqan/basic.h:86,
from /home/mi/cpockrandt/seqan/include/seqan/sequence.h:74,
from
/home/mi/cpockrandt/seqan/tests/index/test_index_vstree.cpp:1:
/home/mi/cpockrandt/seqan/include/seqan/basic/iterator_adaptor.h: In function
'int main()':
/home/mi/cpockrandt/seqan/include/seqan/basic/iterator_adaptor.h:102:9:
warning: '<anonymous>' may be used uninitialized in this function
[-Wmaybe-uninitialized]
data_iterator = TIterator();
^~~~~~~~~~~~~
Interestingly this error occurs only with -O3, not without optimization.
I tried to reduce the code as much as possible but wasn't very successful with
delta & co. It is still quite big, so I uploaded it elsewhere.
http://www.inf.fu-berlin.de/users/cpockrandt/test_index_vstree.ii (6.4 MB).
It might also be a duplicate:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84078