[Bug c++/84492] [8 Regression] ICE with statement expression
aoliva at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 6 06:25:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84492
--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Author: aoliva
Date: Tue Mar 6 06:24:40 2018
New Revision: 258269
URL: https://gcc.gnu.org/viewcvs?rev=258269&root=gcc&view=rev
Log:
[PR c++/84492] stmt expr ending with overload
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.
Added:
trunk/gcc/testsuite/g++.dg/pr84492.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list