On 4/21/24 19:59, Patrick Palka wrote:
On Sat, 20 Apr 2024, Nathaniel Shead wrote:

Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?

-- >8 --

A class allocation member function is implicitly 'static' by
[class.free] p3, so cannot have an explicit object parameter.

        PR c++/114078

gcc/cp/ChangeLog:

        * decl.cc (grokdeclarator): Check allocation functions for xobj
        parameters.

gcc/testsuite/ChangeLog:

        * g++.dg/cpp23/explicit-obj-ops-alloc.C: New test.

LGTM

Agreed, OK.

Reply via email to