Under the new ABI, constructors don't return `this'.
* cp-tree.h (warn_reorder): Declare. (special_function_kind): New enum. (global_base_init_list): Remove declaration. (emit_base_init): Don't return a value. (check_base_init): Don't declare. (is_aggr_typedef): Likewise. * decl.c (check_special_function_return_type): New function. (return_types): Remove. (grokdeclarator): Use check_special_function_return_type. (start_function): Don't initialize ctor_label under the new ABI. (finish_construtor_body): Don't create a corresponding LABEL_STMT. * init.c (begin_init_stmts): Move to top of file. (finish_init_stmts): Likewise. (warn_reorder): Don't declare. (emit_base_init): Don't create a STMT_EXPR here. Don't return a value. (check_base_init): Remove. (is_aggr_typedef): Likewise. (build_new_1): Don't use the return value of a constructor. * semantics.c (setup_vtbl_ptr): Don't use the return value of emit_base_init. * typeck.c (check_return_expr): Don't magically convert return statements into `return this' in constructors under the new ABI. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33035 138bc75d-0d04-0410-961f-82ee72b054a4
Showing
- gcc/cp/ChangeLog 25 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/cp-tree.h 12 additions, 7 deletionsgcc/cp/cp-tree.h
- gcc/cp/decl.c 90 additions, 60 deletionsgcc/cp/decl.c
- gcc/cp/init.c 44 additions, 105 deletionsgcc/cp/init.c
- gcc/cp/semantics.c 1 addition, 1 deletiongcc/cp/semantics.c
- gcc/cp/typeck.c 3 additions, 3 deletionsgcc/cp/typeck.c
Loading
Please register or sign in to comment