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

--- Comment #3 from R. Diez <rdiez-2006 at rd10 dot de> ---
This is still broken in GCC 14.2.

The test code I am using is:

#include <stdlib.h>

struct MyClass
{
  static void FreeMemory ( const void * pMem ) throw();

  __attribute__ (( malloc, malloc( MyClass::FreeMemory, 1 ) ))
  static void * AllocMemory ( size_t Size ) throw();
};

It is available here to play with:

https://godbolt.org/z/EP9x9T1Gv

GCC 11.4 accepts it, and GCC from 12.1 does not anymore. The godbolt.org
sandbox linked above compares GCC 11.4 with GCC 12.4, and version 14.2 still
does not work.

Reply via email to