On 2/1/24 05:59, tlaro...@kergis.com wrote:
1) Test for __GNUC__ as well as __clang__ since gcc has no attributes
for __attribute((malloc)) as well;

Current versions of gcc do:

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute

It is also documented in
 https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Common-Function-Attributes.html
but not in
 https://gcc.gnu.org/onlinedocs/gcc-10.5.0/gcc/Common-Function-Attributes.html
so it looks like it should check for gcc version 11 or later.

--
        -Alan Coopersmith-                 alan.coopersm...@oracle.com
         Oracle Solaris Engineering - https://blogs.oracle.com/solaris

Reply via email to