This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread.h parse error


Fabrice Ménard wrote:
Hi,

Excuse me to contact you directly but I saw your email address
in the gcc fixinclude source directory and I really don't know where
I can mention this issue.

During a compilation (namely digikam from kde), I got this error:

In file included from /usr/src/kde4/src/digikam/libs/database/sqlite2/os.c:72:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include-fixed/pthread.h:539: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’


I got through this by substituting an inline keyword by __inline__ (see the patch) in this file:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include-fixed/pthread.h


I really don't know the difference but it worked.

Hi Fabrice,


I am the person primarily responsible for fixincludes, but others fiddle the
fixes for their target platforms.

In this case, we have a nice mix of pthread and inline hackery.

Here is the problem text, extracted from some version of glibc (which?)

extern inline void
__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
{

My version of this file has a different profile (below). Could you please send me a full copy of your failing pthread.h header? And tell me what the glibc version is? (Run "/lib/libc.so.6" as a program.)

My variation is:

/* Function called to call the cleanup handler.  As an extern inline
   function the compiler is free to decide inlining the change when
   needed or fall back on the copy which must exist somewhere
   else.  */
__extern_inline void
__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
{
  if (__frame->__do_it)
    __frame->__cancel_routine (__frame->__cancel_arg);
}

so it has been stumbled into before. I also do not see any fixes designed to fix up your example code.

Thank you. Regards, Bruce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]