]> gcc.gnu.org Git - gcc.git/commit
c++: Remove cdtor_label
authorJason Merrill <jason@redhat.com>
Fri, 25 Feb 2022 14:58:47 +0000 (09:58 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 4 May 2022 13:54:02 +0000 (09:54 -0400)
commit9c6a4beeed572f9e235f881e00ad8c63b6bcc9df
tree356ad0232c7b7fa9861bd7124187ec792219087d
parenteca04dc8555f5fae462fbd16386da9aaf38a0711
c++: Remove cdtor_label

Jakub pointed out that cdtor_label is unnecessary, we should get all the
desired semantics with a normal return.

gcc/cp/ChangeLog:

* cp-tree.h (struct language_function): Remove x_cdtor_label.
(cdtor_label, LABEL_DECL_CDTOR): Remove.
* constexpr.cc (returns): Don't check LABEL_DECL_CDTOR.
(cxx_eval_constant_expression): Don't call returns.
* decl.cc (check_goto): Don't check cdtor_label.
(start_preparsed_function): And don't set it.
(finish_constructor_body, finish_destructor_body): Remove.
(finish_function_body): Don't call them.
* typeck.cc (check_return_expr): Handle cdtor_returns_this here.
* semantics.cc (finish_return_stmt): Not here.
gcc/cp/constexpr.cc
gcc/cp/cp-tree.h
gcc/cp/decl.cc
gcc/cp/semantics.cc
gcc/cp/typeck.cc
This page took 0.064564 seconds and 5 git commands to generate.