Use __attribute__((malloc(free))) only with GCC >= 11

This commit is contained in:
Sevan Janiyan 2023-11-23 18:49:18 +00:00 committed by Marco d'Itri
parent 8079ab6f52
commit 9cbbbb9c34

View File

@ -24,7 +24,7 @@
# define NONNULL
# define UNUSED
#endif
#if defined __GNUC__ && !defined __clang__
#if (defined __GNUC__ && __GNUC__ >= 11) && !defined __clang__
# define MALLOC_FREE __attribute__((malloc(free)))
#else
# define MALLOC_FREE