From: Ivan Maidanski Date: Mon, 10 Jun 2013 17:03:33 +0000 (+0400) Subject: Tag GC malloc routines with alloc_size attribute for Clang 3.2+ X-Git-Tag: gc7_4_0~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2a2e4d5274777fcecaf0a912e65520a34e10fd4;p=platform%2Fupstream%2Flibgc.git Tag GC malloc routines with alloc_size attribute for Clang 3.2+ * include/gc_config_macros.h (GC_ATTR_ALLOC_SIZE): Define as alloc_size attribute for Clang 3.2+ as well. --- diff --git a/include/gc_config_macros.h b/include/gc_config_macros.h index 9d58900..42743d5 100644 --- a/include/gc_config_macros.h +++ b/include/gc_config_macros.h @@ -243,7 +243,9 @@ /* '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))) + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 && !defined(__ICC)) \ + || __clang_major__ > 3 \ + || (__clang_major__ == 3 && __clang_minor__ >= 2)) # define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum))) # else # define GC_ATTR_ALLOC_SIZE(argnum)