https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609

--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:f8bf6a69e260a5f1aa0dbf89a6e4bcdf1a24af5d

commit r14-7076-gf8bf6a69e260a5f1aa0dbf89a6e4bcdf1a24af5d
Author: waffl3x <waff...@protonmail.com>
Date:   Sun Jan 7 00:03:19 2024 +0000

    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 <waff...@protonmail.com>

Reply via email to