[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static inlining in the gl-list module

From: David Vazquez
Subject: Static inlining in the gl-list module
Date: Mon, 18 May 2009 19:03:01 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)


I am developer in the GNUPDF project development, where we are using
some gnulib modules. Recently, we have some troubles with static
inlining from the gl-list module, with gcc 4.3.2 version. They are
warnings like:

   gcc -DHAVE_CONFIG_H -I. -I../lib -I./base -I./object -I./document -Wall 
-fno-strict-aliasing -g -O2 -MT pdf-hash.lo -MD -MP -MF .deps/pdf-hash.Tpo -c 
base/pdf-hash.c  -fPIC -DPIC -o .libs/pdf-hash.o
   In file included from ./base/pdf-hash.h:30,
                    from base/pdf-hash.c:39:
   ./base/pdf-list.h: In function 'pdf_list_new':
   ./base/pdf-list.h:200: warning: 'gl_list_create_empty_inline' is static but 
used in inline function 'pdf_list_new' which is not static

for each gl-list function which we use. I have taken a look to the
gl-list source code and I see the following comment:

   /* Define all functions of this file as inline accesses to the
      struct gl_list_implementation.  Use #define to avoid a warning
      because of extern vs. static.  */

I don't know very well what it means, but using #define to shadow a
keyword is not desirable. So, I think a GNULIB_USE_INLINE macro to
avoid warnings would be more advisable. It could provide the macros
model of inlining too.

I would like to know your opinion about this and if a patch for fixing
this would be wise.

Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]