-
- Downloads
c++: P0847R7 (deducing this) - diagnostics. [PR102609]
Diagnostics for xobj member functions. Also includes some diagnostics for
xobj lambdas which are not implemented here. CWG2554 is also implemented
here, we explicitly error when an xobj member function overrides a virtual
function.
PR c++/102609
gcc/c-family/ChangeLog:
PR c++/102609
C++23 P0847R7 (deducing this) - diagnostics.
* c-cppbuiltin.cc (c_cpp_builtins): Define
__cpp_explicit_this_parameter=202110L feature test macro.
gcc/cp/ChangeLog:
PR c++/102609
C++23 P0847R7 (deducing this) - diagnostics.
* class.cc (resolve_address_of_overloaded_function): Diagnostics.
* cp-tree.h (TFF_XOBJ_FUNC): Define.
* decl.cc (grokfndecl): Diagnostics.
(grokdeclarator): Diagnostics.
* error.cc (dump_aggr_type): Pass TFF_XOBJ_FUNC.
(dump_lambda_function): Formatting for xobj lambda.
(dump_function_decl): Pass TFF_XOBJ_FUNC.
(dump_parameters): Formatting for xobj member functions.
(function_category): Formatting for xobj member functions.
* parser.cc (cp_parser_decl_specifier_seq): Diagnostics.
(cp_parser_parameter_declaration): Diagnostics.
* search.cc (look_for_overrides_here): Make xobj member functions
override.
(look_for_overrides_r): Reject an overriding xobj member function
and diagnose it.
* semantics.cc (finish_this_expr): Diagnostics.
* typeck.cc (cp_build_addr_expr_1): Diagnostics.
gcc/testsuite/ChangeLog:
PR c++/102609
C++23 P0847R7 (deducing this) - diagnostics.
* g++.dg/cpp23/feat-cxx2b.C: Test existance and value of
__cpp_explicit_this_parameter feature test macro.
* g++.dg/cpp26/feat-cxx26.C: Likewise.
* g++.dg/cpp23/explicit-obj-cxx-dialect-A.C: New test.
* g++.dg/cpp23/explicit-obj-cxx-dialect-B.C: New test.
* g++.dg/cpp23/explicit-obj-cxx-dialect-C.C: New test.
* g++.dg/cpp23/explicit-obj-cxx-dialect-D.C: New test.
* g++.dg/cpp23/explicit-obj-cxx-dialect-E.C: New test.
* g++.dg/cpp23/explicit-obj-diagnostics1.C: New test.
* g++.dg/cpp23/explicit-obj-diagnostics2.C: New test.
* g++.dg/cpp23/explicit-obj-diagnostics3.C: New test.
* g++.dg/cpp23/explicit-obj-diagnostics4.C: New test.
* g++.dg/cpp23/explicit-obj-diagnostics5.C: New test.
* g++.dg/cpp23/explicit-obj-diagnostics6.C: New test.
* g++.dg/cpp23/explicit-obj-diagnostics7.C: New test.
Signed-off-by:
Waffl3x <waffl3x@protonmail.com>
Showing
- gcc/c-family/c-cppbuiltin.cc 1 addition, 0 deletionsgcc/c-family/c-cppbuiltin.cc
- gcc/cp/class.cc 43 additions, 12 deletionsgcc/cp/class.cc
- gcc/cp/cp-tree.h 4 additions, 1 deletiongcc/cp/cp-tree.h
- gcc/cp/decl.cc 122 additions, 16 deletionsgcc/cp/decl.cc
- gcc/cp/error.cc 18 additions, 6 deletionsgcc/cp/error.cc
- gcc/cp/parser.cc 37 additions, 1 deletiongcc/cp/parser.cc
- gcc/cp/search.cc 13 additions, 1 deletiongcc/cp/search.cc
- gcc/cp/semantics.cc 24 additions, 1 deletiongcc/cp/semantics.cc
- gcc/cp/typeck.cc 33 additions, 12 deletionsgcc/cp/typeck.cc
- gcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-A.C 7 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-A.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-B.C 7 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-B.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-C.C 9 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-C.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-D.C 8 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-D.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-E.C 8 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-cxx-dialect-E.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics1.C 139 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics1.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics2.C 26 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics2.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C 20 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics3.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics4.C 16 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics4.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics5.C 23 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics5.C
- gcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics6.C 206 additions, 0 deletionsgcc/testsuite/g++.dg/cpp23/explicit-obj-diagnostics6.C
Loading
Please register or sign in to comment