+
+#ifndef GC_ATTR_MALLOC
+ /* 'malloc' attribute should be used for all malloc-like functions */
+ /* (to tell the compiler that a function may be treated as if any */
+ /* non-NULL pointer it returns cannot alias any other pointer valid */
+ /* when the function returns). If the client code violates this rule */
+ /* by using custom GC_oom_func then define GC_OOM_FUNC_RETURNS_ALIAS. */
+# if !defined(GC_OOM_FUNC_RETURNS_ALIAS) && defined(__GNUC__) \
+ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+# define GC_ATTR_MALLOC __attribute__((__malloc__))
+# else
+# define GC_ATTR_MALLOC
+# endif
+#endif
+
+#ifndef GC_ATTR_ALLOC_SIZE
+ /* 'alloc_size' attribute improves __builtin_object_size correctness. */
+ /* Only single-argument form of 'alloc_size' attribute is used. */
+# if defined(__GNUC__) && (__GNUC__ > 4 \
+ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 && !defined(__ICC)))
+# define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum)))
+# else
+# define GC_ATTR_ALLOC_SIZE(argnum)
+# endif
+#endif