Dear Inkscape-devel,

I became tired of seeing these same warning messages over and over again whenever I compile and debug the code:

/opt/local/include/gc/gc.h:804:23: warning: unknown attribute '__alloc_size__'
      ignored [-Wunknown-attributes]
GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL

For the record, I compile Inkscape 0.91(trunk) with XQuartz backend using latest clang from Xcode. Someone also has seen this before (I’m glad the instructions I posted on the mailing list a year earlier were useful :-)), and the thing about warnings was ignored because the issue there was about getting the code to run.

It seems that clang has removed alloc_size attribute a while ago. But these warnings would pop up about gazillion times per compiling session, from gc.h, so I am wondering if I can suppress this warning specifically. I’m not familiar with how to add a suppression in autoconf. Do I just do the following in configure step?

../trunk/configure --prefix=YOUR_BUILD_DIRECTORY --disable-static --enable-shared CC="clang" CXX="clang++" CXXFLAGS="-std=c++11 -stdlib=libc++ -I/opt/local/include -Wno-unknown-attributes" CPPFLAGS="-I/opt/local/include -U__STRICT_ANSI__ -Wno-unknown-attributes"

If I re-configure the build, do I have to run "make install" again before "make -j 4"?

I’m also not sure if globally suppressing this kind of warning is recommended. I have not seen this kind of warning other than this, and I couldn’t even find its definition on the official Clang documentation. If this is not recommended, does anyone know how I can specifically suppress this particular warning?

Regards,
_______________________
Papoj "Hua" Thamjaroenporn
papoj@...3117...