diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-05-13 16:27:45 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:03:17 -0300 |
commit | 920955be1e4cbb90c165bbf64b1abbbbaaaa9bc2 (patch) | |
tree | 5b9cd7cd6e133ae88979ed84ccba2ec5f141c662 /gcc/tree-inline.c | |
parent | f7ddd68ce057008b9ddbf973d1b51c94c74110b3 (diff) | |
download | gcc-920955be1e4cbb90c165bbf64b1abbbbaaaa9bc2.zip gcc-920955be1e4cbb90c165bbf64b1abbbbaaaa9bc2.tar.gz gcc-920955be1e4cbb90c165bbf64b1abbbbaaaa9bc2.tar.bz2 |
c++: SFINAE for invalid delete-expression [PR79706]
This fixes SFINAE when substitution yields an invalid delete-expression
due to the pertinent deallocation function being marked deleted or
otherwise inaccessible.
We need to check for an erroneous result from build_op_delete_call and
exit early in that case, so that we don't build a COND_EXPR around the
erroneous result which finish_decltype_type would then quietly accept.
gcc/cp/ChangeLog:
PR c++/79706
* init.c (build_vec_delete_1): Just return error_mark_node if
deallocate_expr is error_mark_node.
(build_delete): Just return error_mark_node if do_delete is
error_mark_node.
gcc/testsuite/ChangeLog:
PR c++/79706
* g++.dg/template/sfinae30.C: New test.
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions