aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-11-15 08:00:21 +0100
committerJakub Jelinek <jakub@redhat.com>2022-11-15 08:00:21 +0100
commit6492cec069bccf817ac5e984fb3eca407056a566 (patch)
treefefcbffd560982373a49d8a1a6b0b9c119bd20c6 /contrib/gcc-changelog/git_commit.py
parente0f4fcf9dfb8794a11d4ee63899b820aa9257f50 (diff)
downloadgcc-6492cec069bccf817ac5e984fb3eca407056a566.zip
gcc-6492cec069bccf817ac5e984fb3eca407056a566.tar.gz
gcc-6492cec069bccf817ac5e984fb3eca407056a566.tar.bz2
c++: Implement C++23 P2589R1 - - static operator[]
Here is a patch that implements the static operator[] paper. One thing that doesn't work properly is the same problem as I've filed yesterday for static operator() - PR107624 - that side-effects of the postfix-expression on which the call or subscript operator are applied are thrown away, I assume we have to add them into COMPOUND_EXPR somewhere after we find out that the we've chosen a static member function operator. 2022-11-15 Jakub Jelinek <jakub@redhat.com> gcc/c-family/ * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23 __cpp_multidimensional_subscript macro value to 202211L. gcc/cp/ * decl.cc (grok_op_properties): Implement C++23 P2589R1 - static operator[]. Handle operator[] similarly to operator() - allow static member functions, but pedwarn on it for C++20 and older. Unlike operator(), perform rest of checks on it though for C++20. * call.cc (add_operator_candidates): For operator[] with class typed first parameter, pass that parameter as first_arg and an adjusted arglist without that parameter. gcc/testsuite/ * g++.dg/cpp23/subscript9.C: New test. * g++.dg/cpp23/feat-cxx2b.C: Expect a newer __cpp_multidimensional_subscript value. * g++.old-deja/g++.bugs/900210_10.C: Don't expect an error for C++23 or later.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions