-
- Downloads
c++: ICE with noexcept and local specialization, again [PR114349]
Patrick noticed that my r14-9339-gdc6c3bfb59baab patch is wrong; we're dealing with a noexcept-spec there, not a noexcept-expr, so setting cp_noexcept_operand et al is incorrect. Back to the drawing board then. To fix noexcept84.C, we should probably avoid doing push_to_top_level in certain cases. maybe_push_to_top_level didn't work here as-is, so I changed it to not push to top level if decl_function_context is non-null, when we are not dealing with a lambda. This also fixes c++/114349, introduced by r14-9339. PR c++/114349 gcc/cp/ChangeLog: * name-lookup.cc (maybe_push_to_top_level): For a non-lambda, don't push to top level if decl_function_context is non-null. * pt.cc (maybe_instantiate_noexcept): Use maybe_push_to_top_level. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/noexcept85.C: New test. * g++.dg/cpp0x/noexcept86.C: New test.
Showing
- gcc/cp/name-lookup.cc 7 additions, 4 deletionsgcc/cp/name-lookup.cc
- gcc/cp/pt.cc 2 additions, 9 deletionsgcc/cp/pt.cc
- gcc/testsuite/g++.dg/cpp0x/noexcept85.C 33 additions, 0 deletionsgcc/testsuite/g++.dg/cpp0x/noexcept85.C
- gcc/testsuite/g++.dg/cpp0x/noexcept86.C 25 additions, 0 deletionsgcc/testsuite/g++.dg/cpp0x/noexcept86.C
Loading
Please register or sign in to comment