[Bug c++/79488] [7 Regression] ICE from lambda that has invalid return type
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 13 13:40:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79488
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |6.3.1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
GCC 5 and 6 stop with "confused by earlier errors, bailing out" instead:
r.cc: In instantiation of 'struct res<F>':
r.cc:13:46: required from 'struct A<Fn>::run() [with Fn = F]::<lambda>'
r.cc:13:51: required from 'void A<Fn>::run() [with Fn = F]'
r.cc:22:7: required from here
r.cc:6:30: error: no match for call to '(F) ()'
using type = decltype(val()());
~~~~~^~
r.cc:19:8: note: candidate: void F::operator()() & <near match>
void operator()() &;
^~~~~~~~
r.cc:19:8: note: passing 'F' as 'this' argument discards qualifiers
r.cc:10:30: error: 'void A<Fn>::set_result(T) [with T = A<Fn>::run() [with Fn =
F]::<lambda>; Fn = F]', declared using local type 'A<Fn>::run() [with Fn =
F]::<lambda>', is used but never defined [-fpermissive]
template <typename T> void set_result(T) {}
^~~~~~~~~~
r.cc:10: confused by earlier errors, bailing out
More information about the Gcc-bugs
mailing list