[Spice-devel] [spice-protocol PATCH v2 01/10] macros: verify if __alloc_size__ works with clang

Christophe Fergeau cfergeau at redhat.com
Mon Aug 24 04:55:05 PDT 2015


On Fri, Aug 14, 2015 at 06:24:22PM +0200, Victor Toso wrote:
> So we can avoid using using an attribute not supported for the compiler.
> 
> warning:
> ../spice-common/common/mem.h:91:80: warning: unknown attribute
> '__alloc_size__' ignored [-Wunknown-attributes]

Any idea if this is because your clang is too old, or because it only
knows of __attribute__((alloc_size(x,y)) which is what is documented at
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-g_t_0040code_007balloc_005fsize_007d-function-attribute-3080
?

According to
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120521/058005.html
clang has support for this attribute.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150824/e4f542f7/attachment.sig>


More information about the Spice-devel mailing list