Subj : Re: How to pass class-member function to pthread_create(....)? To : comp.programming.threads From : Vyacheslav Kononenko Date : Mon Jul 18 2005 11:24 am Maciej Sobczak wrote: > Vyacheslav Kononenko wrote: > > > please provide reference in C++ standard wich says how extern "C" > > linkage affect calling conventions then. > > Calling convention has nothing to do about it. According to link that Chris provided it is the issue: [While that might work on some platforms, it's not legal C++. The POSIX standard is a C Language binding, NOT C++. There's no rule that C and C++ must follow the same calling conventions. In many cases, they do; or at least it's "close enough" that a C function with a single argument and a class member function with no (explicit) arguments are the same. Counting on that, though, is just asking for trouble. ] > 7.5/1: > > "Two function types with different language linkages are distinct types > even if they are otherwise identical." > > The problem is that converting a function pointer of type "C++" to the > function pointer of type "C" is simply illegal - they are different types. Although function types are different function pointers types are not. Correct me if I am wrong. Regards, Vyacheslav .