mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
Account for clangs lack of __alloc_size__
clang's emulation of gcc 4.3 is not perfect, despite its pretending that it is. https://bugzilla.gnome.org/show_bug.cgi?id=745821
This commit is contained in:
parent
0e0b777cfb
commit
42870201f8
@ -63,7 +63,8 @@
|
||||
#define G_GNUC_NULL_TERMINATED
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
#if (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \
|
||||
(defined(__clang__) && __has_attribute(__alloc_size__))
|
||||
#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
|
||||
#define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user