https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119528
Bug ID: 119528 Summary: __attribute__((deprecated(text)) triggers with __attribute__((malloc(deallocator, index))) Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: akallabeth+gnu at posteo dot net Target Milestone: --- Got the following (deprecated) pair of allocator/deallocators declared in a header: __attribute__((deprecated("deprecated")) void free_foo(FOO* var); __attribute__((deprecated("deprecated")) __attribute__((malloc(free_foo, 1))) FOO* create_foo(void); now this alone is enough to trigger deprecation warnings during a compile every time the header is included. looks like `GCC` considers the __attribute__((malloc(free_foo, 1))) as usage of free_foo for comparison, tried to compile the same with clang (19.7.1) and there there are no warnings emitted.