[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 05:20:28 PDT 2015


On Mon, Aug 24, 2015 at 02:08:49PM +0200, Victor Toso wrote:
> Hey,
> 
> On Mon, Aug 24, 2015 at 01:55:05PM +0200, Christophe Fergeau wrote:
> > 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
> 
> Looks like they drop it :(
> https://github.com/llvm-mirror/clang/commit/c047507a9a79e89fc8339e074fa72822a7e7ea73

Ah indeed :)

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/c5687633/attachment.sig>


More information about the Spice-devel mailing list