[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 --- Comment #7 from Jason Merrill --- *** Bug 61814 has been marked as a duplicate of this bug. ***
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |6.0 --- Comment #6 from Jason Merrill --- Fixed.
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 --- Comment #8 from Jason Merrill --- Author: jason Date: Wed Dec 16 18:36:55 2015 New Revision: 231715 URL: https://gcc.gnu.org/viewcvs?rev=231715=gcc=rev Log: PR c++/63628 * pt.c (tsubst_pack_expansion): Also make dummy decls if retrieve_local_specialization fails. Added: branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic3.C Modified: branches/gcc-5-branch/gcc/cp/ChangeLog branches/gcc-5-branch/gcc/cp/pt.c
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 --- Comment #5 from Jason Merrill --- Author: jason Date: Wed Dec 16 18:22:17 2015 New Revision: 231713 URL: https://gcc.gnu.org/viewcvs?rev=231713=gcc=rev Log: PR c++/63628 * pt.c (tsubst_pack_expansion): Also make dummy decls if retrieve_local_specialization fails. Added: trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic3.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 --- Comment #4 from Jason Merrill --- (In reply to Paolo Carlini from comment #3) > The second and third variants work in mainline. Yes, they were fixed by the patch for bug 68309. We need a further fix to handle the original testcase.
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 --- Comment #3 from Paolo Carlini --- The second and third variants work in mainline.
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2014-10-23 Summary|[c++1y] cannot use decltype |[c++1y] cannot use decltype |on captured variable in |on captured arg-pack |generic lambda | Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org --- This still fails on trunk, reduced from the original code in PR 61814 auto const pack = [](auto... t) { [] { int a[] = { static_castdecltype(t)(t)... }; }; }; int main() { pack(1); } ll.cc: In instantiation of ‘lambda(auto:1 ...)::lambda() [with auto:1 = {int}]’: ll.cc:5:49: required from ‘structlambda(auto:1 ...) [with auto:1 = {int}]::lambda()’ ll.cc:3:9: required from ‘lambda(auto:1 ...) [with auto:1 = {int}]’ ll.cc:10:15: required from here ll.cc:5:55: error: cannot convert ‘decltype (t)’ to ‘int’ in initialization int a[] = { static_castdecltype(t)(t)... }; ^ ll.cc:5:55: error: storage size of ‘a’ isn’t known
[Bug c++/63628] [c++1y] cannot use decltype on captured arg-pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63628 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org --- And this variation gives an ICE: void sink(...) { } auto const pack = [](auto... t) { [] { sink( static_castdecltype(t)(t)... ); }; }; int main() { pack(1); } ll.cc: In instantiation of ‘lambda(auto:1 ...)::lambda() [with auto:1 = {int}]’: ll.cc:7:43: required from ‘structlambda(auto:1 ...) [with auto:1 = {int}]::lambda()’ ll.cc:5:9: required from ‘lambda(auto:1 ...) [with auto:1 = {int}]’ ll.cc:12:15: required from here ll.cc:7:16: internal compiler error: in cxx_incomplete_type_diagnostic, at cp/typeck2.c:572 sink( static_castdecltype(t)(t)... ); ^ 0x615fb9 cxx_incomplete_type_diagnostic(tree_node const*, tree_node const*, diagnostic_t) /home/jwakely/src/gcc/gcc/cp/typeck2.c:572 0x6ba1c4 complete_type_or_maybe_complain(tree_node*, tree_node*, int) /home/jwakely/src/gcc/gcc/cp/typeck.c:153 0x6ba279 require_complete_type_sfinae(tree_node*, int) /home/jwakely/src/gcc/gcc/cp/typeck.c:90 0x552061 convert_arg_to_ellipsis(tree_node*, int) /home/jwakely/src/gcc/gcc/cp/call.c:6565 0x557e37 build_over_call /home/jwakely/src/gcc/gcc/cp/call.c:7265 0x56dfcb build_new_function_call(tree_node*, vectree_node*, va_gc, vl_embed**, bool, int) /home/jwakely/src/gcc/gcc/cp/call.c:4072 0x71c5cc finish_call_expr(tree_node*, vectree_node*, va_gc, vl_embed**, bool, bool, int) /home/jwakely/src/gcc/gcc/cp/semantics.c:2361 0x6b9b86 complete_type(tree_node*) /home/jwakely/src/gcc/gcc/cp/typeck.c:134 0x6506a5 mark_used(tree_node*, int) /home/jwakely/src/gcc/gcc/cp/decl2.c:4936 0x55870b build_over_call /home/jwakely/src/gcc/gcc/cp/call.c:7411 0x56bf2b build_op_call_1 /home/jwakely/src/gcc/gcc/cp/call.c:4303 0x56bf2b build_op_call(tree_node*, vectree_node*, va_gc, vl_embed**, int) /home/jwakely/src/gcc/gcc/cp/call.c:4326 0x71c513 finish_call_expr(tree_node*, vectree_node*, va_gc, vl_embed**, bool, bool, int) /home/jwakely/src/gcc/gcc/cp/semantics.c:2378 0x7e4e82 c_common_parse_file() /home/jwakely/src/gcc/gcc/c-family/c-opts.c:1050 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See http://gcc.gnu.org/bugs.html for instructions.