pr84492.C
592 Bytes
-
[PR c++/84492] stmt expr ending with overload · 1ea71a82
We ICEd when returning a stmt expr that ends with an overloaded function, because instantiate_type did not know what to do with STMT_EXPRs. And it shouldn't have to: the expected type of a stmt expr cannot be used to resolve its value: an unresolved overload cannot supply the result of a stmt expr. Catch that and report the error in the stmt expr before we have a chance to instantiate it. for gcc/cp/ChangeLog PR c++/84492 * semantics.c (finish_stmt_expr_expr): Reject unresolved overloads used as stmt expr values. for gcc/testsuite/ChangeLog PR c++/84492 * g++.dg/pr84492.C: New. From-SVN: r258269
Alexandre Oliva committed