Boost logo

Boost :

Subject: Re: [boost] boost::thread compiler error on SUN CC 5.9
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2010-06-07 19:08:19


I'm interested in this patch as well.
Thanks,
Alex

Urs Stotz wrote:
> boost::thread give a compile error on SUN CC 5.9:
>
> /opt/SUNWspro/bin/CC +d -library=stlport4 -library=stlport4 -xcode=pic32 -erroff=wvarhidemem,hidevf,hidevfinvb -errtags=yes -features=tmplife -features=tmplrefstatic -g -mt -erroff=%none -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_POSIX -I"." -c -o "bin.v2/libs/thread/build/sun-5.9/debug/stdlib-sun-stlport/threading-multi/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"
> "libs/thread/src/pthread/thread.cpp", line 77: Error, badbinaryop: The operation "boost::shared_ptr<boost::detail::tss_cleanup_function> && void*" is illegal.
> "libs/thread/src/pthread/thread.cpp", line 588: Error, badbinaryop: The operation "boost::shared_ptr<boost::detail::tss_cleanup_function> || void*" is illegal.
> 2 Error(s) detected.
> make: *** [thread.o] Error 2
>
> with this small patch it will compile:
>
> --- boost_1_42_0.org/libs/thread/src/pthread/thread.cpp 2009-10-19 11:18:13.000000000 +0200
> +++ boost_1_42_0/libs/thread/src/pthread/thread.cpp 2010-02-10 13:48:25.037748000 +0100
> @@ -74,7 +74,7 @@ namespace boost
> {
> current=next;
> ++next;
> - if(current->second.func && current->second.value)
> + if(current->second.func && (current->second.value != 0))
> {
> (*current->second.func)(current->second.value);
> }
> @@ -585,7 +585,7 @@ namespace boost
> {
> (*current_node->func)(current_node->value);
> }
> - if(func || tss_data)
> + if(func || (tss_data != 0) )
> {
> current_node->func=func;
> current_node->value=tss_data;
>
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

-- 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk