Boost logo

Boost Users :

From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2003-08-22 02:21:41


"Johan Nilsson" <johan.nilsson_at_[hidden]> wrote in message
news:bi2ah3$cko$1_at_sea.gmane.org...
> Hi,
>

[snip]

>
> -------------------------------------------------------------------------
> res = pthread_key_create(&m_key, cleanup);
> .....................................^
> %CXX-E-INCOMPATIBLEPRM, argument of type "void (*)(void *)" is
incompatible
> with parameter of type "void (*)(void *) C"
> at line number 192 in file
> DISK$USER1:[COMMON.BOOST.LIBS.THREAD.SRC]TSS.CPP;1
> --------------------------------------------------------------------------

--
> ---
>
Reading paragraph 7.5 [Linkage specifications] in the standard it looks like
the compiler is right; "... Two function types with different language
linkage are distinct types even if they are otherwise identical ...". Or am
I (as usual, perhaps) misinterpreting the standard? (How come that the
compiler is not complaining when we call C functions from C++ :-)
If this is correct, perhaps implementing a fix would be in place?
// Johan

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net