This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83739] New: error: range-based 'for' expression of type 'auto' has incomplete type
- From: "bugzilla at cpockrandt dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Jan 2018 17:18:38 +0000
- Subject: [Bug c++/83739] New: error: range-based 'for' expression of type 'auto' has incomplete type
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83739
Bug ID: 83739
Summary: error: range-based 'for' expression of type 'auto' has
incomplete type
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bugzilla at cpockrandt dot de
Target Milestone: ---
Compiler/OS information:
g++8 (FreeBSD Ports Collection) 8.0.0 20171224 (experimental)
Error-Message (see below for complete output):
/home/mi/user/seqan/tests/index/test_find2_index_approx.h:478:9: error:
range-based 'for' expression of type 'auto' has incomplete type
for (auto occ : getOccurrences(iter))
^~~
Command:
/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/user/seqan/include -save-temps -W -Wall
-pedantic -fno-omit-frame-pointer -fopenmp -g -DSEQAN_ENABLE_DEBUG=1
-DSEQAN_GLOBAL_EXCEPTION_HANDLER=1 -o
CMakeFiles/test_find2_index_approx.dir/test_find2_index_approx.cpp.o -c
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp
It works with the latest versions of g++4, 5, 6 and 7 and clang.
-----------------------------------------------------------
Complete output:
[user@celegans ~/seqan-build]$ make VERBOSE=1 test_find2_index_approx
/usr/local/bin/cmake -H/home/mi/user/seqan -B/home/mi/user/seqan-build
--check-build-system CMakeFiles/Makefile.cmake 0
make -f CMakeFiles/Makefile2 test_find2_index_approx
/usr/local/bin/cmake -H/home/mi/user/seqan -B/home/mi/user/seqan-build
--check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start
/home/mi/user/seqan-build/CMakeFiles 0
make -f CMakeFiles/Makefile2
tests/index/CMakeFiles/test_find2_index_approx.dir/all
make -f CMakeFiles/seqan_library.dir/build.make
CMakeFiles/seqan_library.dir/depend
cd /home/mi/user/seqan-build && /usr/local/bin/cmake -E cmake_depends "Unix
Makefiles" /home/mi/user/seqan /home/mi/user/seqan /home/mi/user/seqan-build
/home/mi/user/seqan-build
/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/DependInfo.cmake
--color=
Dependee
"/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/DependInfo.cmake" is
newer than depender
"/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/depend.internal".
Dependee "/home/mi/user/seqan-build/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/depend.internal".
Scanning dependencies of target seqan_library
make -f CMakeFiles/seqan_library.dir/build.make
CMakeFiles/seqan_library.dir/build
Built target seqan_library
make -f tests/index/CMakeFiles/test_find2_index_approx.dir/build.make
tests/index/CMakeFiles/test_find2_index_approx.dir/depend
cd /home/mi/user/seqan-build && /usr/local/bin/cmake -E cmake_depends "Unix
Makefiles" /home/mi/user/seqan /home/mi/user/seqan/tests/index
/home/mi/user/seqan-build /home/mi/user/seqan-build/tests/index
/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/DependInfo.cmake
--color=
Dependee
"/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/DependInfo.cmake"
is newer than depender
"/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/depend.internal".
Dependee
"/home/mi/user/seqan-build/tests/index/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/depend.internal".
Scanning dependencies of target test_find2_index_approx
make -f tests/index/CMakeFiles/test_find2_index_approx.dir/build.make
tests/index/CMakeFiles/test_find2_index_approx.dir/build
Building CXX object
tests/index/CMakeFiles/test_find2_index_approx.dir/test_find2_index_approx.cpp.o
cd /home/mi/user/seqan-build/tests/index && /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/user/seqan/include -save-temps -W -Wall -pedantic
-fno-omit-frame-pointer -fopenmp -g -DSEQAN_ENABLE_DEBUG=1
-DSEQAN_GLOBAL_EXCEPTION_HANDLER=1 -o
CMakeFiles/test_find2_index_approx.dir/test_find2_index_approx.cpp.o -c
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp
In file included from
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp:37:
/home/mi/user/seqan/tests/index/test_find2_index_approx.h: In instantiation of
'void SEQAN_TEST_test_find2_index_approx_small_test() [with bool
speed_up_dummy_to_prevent_compilation_of_unused_tests_ = true]':
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp:44:135: required
from here
/home/mi/user/seqan/tests/index/test_find2_index_approx.h:478:9: error:
range-based 'for' expression of type 'auto' has incomplete type
for (auto occ : getOccurrences(iter))
^~~
In file included from /home/mi/user/seqan/include/seqan/index.h:236,
from
/home/mi/user/seqan/tests/index/test_find2_index_approx.h:40,
from
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp:37:
/home/mi/user/seqan/include/seqan/index/find2_index_approx.h:606:1: error:
'void seqan::find(TDelegate&, seqan::Index<TText,
seqan::BidirectionalIndex<TIndexSpec> >&, const seqan::StringSet<TNeedle,
TStringSetSpec>&, const TDistanceTag&, const TParallelTag&) [with long unsigned
int minErrors = 1; long unsigned int maxErrors = 2; TDelegate =
SEQAN_TEST_test_find2_index_approx_small_test() [with bool
speed_up_dummy_to_prevent_compilation_of_unused_tests_ =
true]::<lambda(auto:2&, const DnaString&, uint8_t)>; TText =
seqan::String<seqan::SimpleType<unsigned char, seqan::Dna_>, seqan::Alloc<> >;
TIndexSpec = seqan::FMIndex<>; TNeedle =
seqan::String<seqan::SimpleType<unsigned char, seqan::Dna_>, seqan::Alloc<> >;
TStringSetSpec = seqan::Owner<>; TDistanceTag =
seqan::Tag<seqan::LevenshteinDistance_>; TParallelTag =
seqan::Tag<seqan::Serial_>]', declared using local type
'SEQAN_TEST_test_find2_index_approx_small_test() [with bool
speed_up_dummy_to_prevent_compilation_of_unused_tests_ =
true]::<lambda(auto:2&, const DnaString&, uint8_t)>', is used but never defined
[-fpermissive]
find(TDelegate & delegate,
^~~~
/home/mi/user/seqan/include/seqan/index/find2_index_approx.h:606:1: error:
'void seqan::find(TDelegate&, seqan::Index<TText,
seqan::BidirectionalIndex<TIndexSpec> >&, const seqan::StringSet<TNeedle,
TStringSetSpec>&, const TDistanceTag&, const TParallelTag&) [with long unsigned
int minErrors = 1; long unsigned int maxErrors = 2; TDelegate =
SEQAN_TEST_test_find2_index_approx_small_test() [with bool
speed_up_dummy_to_prevent_compilation_of_unused_tests_ =
true]::<lambda(auto:2&, const DnaString&, uint8_t)>; TText =
seqan::String<seqan::SimpleType<unsigned char, seqan::Dna_>, seqan::Alloc<> >;
TIndexSpec = seqan::FMIndex<>; TNeedle =
seqan::String<seqan::SimpleType<unsigned char, seqan::Dna_>, seqan::Alloc<> >;
TStringSetSpec = seqan::Owner<>; TDistanceTag =
seqan::Tag<seqan::LevenshteinDistance_>; TParallelTag =
seqan::Tag<seqan::Parallel_>]', declared using local type
'SEQAN_TEST_test_find2_index_approx_small_test() [with bool
speed_up_dummy_to_prevent_compilation_of_unused_tests_ =
true]::<lambda(auto:2&, const DnaString&, uint8_t)>', is used but never defined
[-fpermissive]
*** Error code 1
Stop.
make[3]: stopped in /usr/home/mi/user/seqan-build
*** Error code 1
Stop.
make[2]: stopped in /usr/home/mi/user/seqan-build
*** Error code 1
Stop.
make[1]: stopped in /usr/home/mi/user/seqan-build
*** Error code 1
Stop.
make: stopped in /usr/home/mi/user/seqan-build