[riot-notifications] [RIOT-OS/RIOT] pkg/tlsf: Fix the way system functions are overriden. (#12031)

Martine Lenders notifications at github.com
Thu Sep 12 22:47:10 CEST 2019


miri64 commented on this pull request.



> +#include "irq.h"
+#include "tlsf.h"
+#include "tlsf-malloc.h"
+#include "tlsf-malloc-internal.h"
+
+/* TODO: Add defines for other compilers */
+#if defined(__GNUC__) && !defined(__clang__)    /* Clang supports __GNUC__ but
+                                                 * not the alloc_size()
+                                                 * attribute */
+
+#define ATTR_MALLOC  __attribute__((malloc, alloc_size(1)))
+#define ATTR_CALLOC  __attribute__((malloc, alloc_size(1,2)))
+#define ATTR_MALIGN  __attribute__((alloc_align(1), alloc_size(2), malloc))
+#define ATTR_REALLOC  __attribute__((alloc_size(2)))
+
+#else /* No GNU C -> no alias attribute */

Isn't `#warning` a GNU C extension? At least that's the warning I always get if I use it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12031#discussion_r323941942
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190912/7ad9a04c/attachment.htm>


More information about the notifications mailing list