]> granicus.if.org Git - gc/commitdiff
Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 20 Oct 2017 18:15:54 +0000 (21:15 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 20 Oct 2017 18:15:54 +0000 (21:15 +0300)
* include/gc_config_macros.h [_MSC_VER>=1900 && !__EDG__]
(GC_ATTR_MALLOC): Add __declspec(allocator).

include/gc_config_macros.h

index 3d64dfef8d40b10fdd9e16ba1d1440416bc0849a..38752d644b04977ba5acf5b01ba5f2a15382948e 100644 (file)
 #   define GC_ATTR_MALLOC /* empty */
 # elif GC_GNUC_PREREQ(3, 1)
 #   define GC_ATTR_MALLOC __attribute__((__malloc__))
+# elif defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(__EDG__)
+#   define GC_ATTR_MALLOC \
+                __declspec(allocator) __declspec(noalias) __declspec(restrict)
 # elif defined(_MSC_VER) && _MSC_VER >= 1400
 #   define GC_ATTR_MALLOC __declspec(noalias) __declspec(restrict)
 # else