This is the mail archive of the gcc@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]

Re: threads in C++


On Nov 15, 1999, Mike Stump <mrs@windriver.com> wrote:

>> Date: Mon, 15 Nov 1999 12:14:22 -0500
>> From: Dima Volodin <dvv@dvv.org>

>> > Not necessarily. You could use a static member function. But if you need
>> > to get at object data, you'll have to get that passed in explicitly.

>> POSIX doesn't say you can use a "static member function", ergo you
>> can not. If the trick works for g++, it doesn't mean it will work
>> for any other compiler.

> They also don't say that you can do with with functions named foo, but
> guess what, you can.  Or let me put this another way, C++ guarantees
> that this can be done.

Not if a compiler uses different calling conventions for C and C++,
which I believe isn't forbidden.  In this case, the (lack of) `extern
"C"' could make much of a difference.

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them


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