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

            Bug ID: 111105
           Summary: [12/13/14 regression] __attribute__((malloc)) can no
                    longer name a C++ member function
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thiago at kde dot org
  Target Milestone: ---

This compiles with GCC 11:

struct QArrayData
{
    static void free(void *);
    __attribute__((malloc(QArrayData::free))) static void *allocate();
};

But fails since 12.0.

error: 'malloc' attribute argument 1 does not name a function

See https://conformance.godbolt.org/z/n76jTsahT

Reply via email to