Boost logo

Boost :

From: Robert Zeh (razeh_at_[hidden])
Date: 2005-04-04 09:21:28


"Peter Dimov" <pdimov_at_[hidden]> writes:

> I just added boost/detail/sp_counted_base_gcc_x86.hpp to the CVS. It
> is not enabled yet, i.e. sp_counted_base.hpp will not include it
> automatically.
>
> If you are interested, please take a look at the file and give it a
> test run. The easiest way to enable it is to do
>
> #include <boost/detail/sp_counted_base_gcc_x86.hpp>
> #define BOOST_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED
>
> (or to copy it over sp_counted_base.hpp) before including
> shared_ptr.hpp. Any comments appreciated.
>
> As usual, thanks to Alexander Terekhov for all the help and patience.

After building a copy fresh from the repository, I altered all of the
files in libs/smart_ptr/test as instructed above.

I am using a locally build gcc 3.4.3 on Redhat.

I received quite a few compiler errors, which I've attached below.

Robert Zeh

razeh_at_lb1:/home/razeh/boost/libs/smart_ptr/test$ bjam
...found 335 targets...
...updating 39 targets...
gcc-Link-action ../../../bin/boost/libs/smart_ptr/test/lw_mutex_test.test/gcc/debug/lw_mutex_test
Chmod1 ../../../bin/boost/libs/smart_ptr/test/lw_mutex_test.test/gcc/debug/lw_mutex_test
gcc-Link-action ../../../bin/boost/libs/smart_ptr/test/atomic_count_test.test/gcc/debug/atomic_count_test
Chmod1 ../../../bin/boost/libs/smart_ptr/test/atomic_count_test.test/gcc/debug/atomic_count_test
gcc-Link-action ../../../bin/boost/libs/smart_ptr/test/intrusive_ptr_test.test/gcc/debug/intrusive_ptr_test
Chmod1 ../../../bin/boost/libs/smart_ptr/test/intrusive_ptr_test.test/gcc/debug/intrusive_ptr_test
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/get_deleter_test.test/gcc/debug/get_deleter_test.o
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp: In function `long int boost::detail::atomic_exchange_and_add(long int*, long int)':
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: error: inconsistent operand constraints in an `asm'

    set -e
    "g++" -c -Wall -ftemplate-depth-255 -g -O0 -fno-inline -I"../../../bin/boost/libs/smart_ptr/test" -I "/home/razeh/boost" -o "../../../bin/boost/libs/smart_ptr/test/get_deleter_test.test/gcc/debug/get_deleter_test.o" "../../../libs/smart_ptr/test/get_deleter_test.cpp"
    "/usr/bin/objcopy" --set-section-flags .debug_str=contents,debug "../../../bin/boost/libs/smart_ptr/test/get_deleter_test.test/gcc/debug/get_deleter_test.o"

...failed gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/get_deleter_test.test/gcc/debug/get_deleter_test.o...
...removing ../../../bin/boost/libs/smart_ptr/test/get_deleter_test.test/gcc/debug/get_deleter_test.o
...skipped <@boost!libs!smart_ptr!test/get_deleter_test.test/gcc/debug>get_deleter_test for lack of <@boost!libs!smart_ptr!test/get_deleter_test.test/gcc/debug>get_deleter_test.o...
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_from_this_test.test/gcc/debug/shared_from_this_test.o
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp: In function `long int boost::detail::atomic_exchange_and_add(long int*, long int)':
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: error: inconsistent operand constraints in an `asm'

    set -e
    "g++" -c -Wall -ftemplate-depth-255 -g -O0 -fno-inline -Wno-non-virtual-dtor -I"../../../bin/boost/libs/smart_ptr/test" -I "/home/razeh/boost" -o "../../../bin/boost/libs/smart_ptr/test/shared_from_this_test.test/gcc/debug/shared_from_this_test.o" "../../../libs/smart_ptr/test/shared_from_this_test.cpp"
    "/usr/bin/objcopy" --set-section-flags .debug_str=contents,debug "../../../bin/boost/libs/smart_ptr/test/shared_from_this_test.test/gcc/debug/shared_from_this_test.o"

...failed gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_from_this_test.test/gcc/debug/shared_from_this_test.o...
...removing ../../../bin/boost/libs/smart_ptr/test/shared_from_this_test.test/gcc/debug/shared_from_this_test.o
...skipped <@boost!libs!smart_ptr!test/shared_from_this_test.test/gcc/debug>shared_from_this_test for lack of <@boost!libs!smart_ptr!test/shared_from_this_test.test/gcc/debug>shared_from_this_test.o...
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/weak_ptr_test.test/gcc/debug/weak_ptr_test.o
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp: In function `long int boost::detail::atomic_exchange_and_add(long int*, long int)':
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: error: inconsistent operand constraints in an `asm'

    set -e
    "g++" -c -Wall -ftemplate-depth-255 -g -O0 -fno-inline -I"../../../bin/boost/libs/smart_ptr/test" -I "/home/razeh/boost" -o "../../../bin/boost/libs/smart_ptr/test/weak_ptr_test.test/gcc/debug/weak_ptr_test.o" "../../../libs/smart_ptr/test/weak_ptr_test.cpp"
    "/usr/bin/objcopy" --set-section-flags .debug_str=contents,debug "../../../bin/boost/libs/smart_ptr/test/weak_ptr_test.test/gcc/debug/weak_ptr_test.o"

...failed gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/weak_ptr_test.test/gcc/debug/weak_ptr_test.o...
...removing ../../../bin/boost/libs/smart_ptr/test/weak_ptr_test.test/gcc/debug/weak_ptr_test.o
...skipped <@boost!libs!smart_ptr!test/weak_ptr_test.test/gcc/debug>weak_ptr_test for lack of <@boost!libs!smart_ptr!test/weak_ptr_test.test/gcc/debug>weak_ptr_test.o...
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_ptr_test.test/gcc/debug/shared_ptr_test.o
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp: In function `long int boost::detail::atomic_exchange_and_add(long int*, long int)':
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: error: inconsistent operand constraints in an `asm'

    set -e
    "g++" -c -Wall -ftemplate-depth-255 -g -O0 -fno-inline -Wno-non-virtual-dtor -I"../../../bin/boost/libs/smart_ptr/test" -I "/home/razeh/boost" -o "../../../bin/boost/libs/smart_ptr/test/shared_ptr_test.test/gcc/debug/shared_ptr_test.o" "../../../libs/smart_ptr/test/shared_ptr_test.cpp"
    "/usr/bin/objcopy" --set-section-flags .debug_str=contents,debug "../../../bin/boost/libs/smart_ptr/test/shared_ptr_test.test/gcc/debug/shared_ptr_test.o"

...failed gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_ptr_test.test/gcc/debug/shared_ptr_test.o...
...removing ../../../bin/boost/libs/smart_ptr/test/shared_ptr_test.test/gcc/debug/shared_ptr_test.o
...skipped <@boost!libs!smart_ptr!test/shared_ptr_test.test/gcc/debug>shared_ptr_test for lack of <@boost!libs!smart_ptr!test/shared_ptr_test.test/gcc/debug>shared_ptr_test.o...
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_ptr_basic_test.test/gcc/debug/shared_ptr_basic_test.o
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp: In function `long int boost::detail::atomic_exchange_and_add(long int*, long int)':
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: error: inconsistent operand constraints in an `asm'

    set -e
    "g++" -c -Wall -ftemplate-depth-255 -g -O0 -fno-inline -Wno-non-virtual-dtor -I"../../../bin/boost/libs/smart_ptr/test" -I "/home/razeh/boost" -o "../../../bin/boost/libs/smart_ptr/test/shared_ptr_basic_test.test/gcc/debug/shared_ptr_basic_test.o" "../../../libs/smart_ptr/test/shared_ptr_basic_test.cpp"
    "/usr/bin/objcopy" --set-section-flags .debug_str=contents,debug "../../../bin/boost/libs/smart_ptr/test/shared_ptr_basic_test.test/gcc/debug/shared_ptr_basic_test.o"

...failed gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_ptr_basic_test.test/gcc/debug/shared_ptr_basic_test.o...
...removing ../../../bin/boost/libs/smart_ptr/test/shared_ptr_basic_test.test/gcc/debug/shared_ptr_basic_test.o
...skipped <@boost!libs!smart_ptr!test/shared_ptr_basic_test.test/gcc/debug>shared_ptr_basic_test for lack of <@boost!libs!smart_ptr!test/shared_ptr_basic_test.test/gcc/debug>shared_ptr_basic_test.o...
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/smart_ptr_test.test/gcc/debug/smart_ptr_test.o
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp: In function `long int boost::detail::atomic_exchange_and_add(long int*, long int)':
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: warning: matching constraint does not allow a register
/home/razeh/boost/boost/detail/sp_counted_base_gcc_x86.hpp:50: error: inconsistent operand constraints in an `asm'

    set -e
    "g++" -c -Wall -ftemplate-depth-255 -g -O0 -fno-inline -I"../../../bin/boost/libs/smart_ptr/test" -I "/home/razeh/boost" -o "../../../bin/boost/libs/smart_ptr/test/smart_ptr_test.test/gcc/debug/smart_ptr_test.o" "../../../libs/smart_ptr/test/smart_ptr_test.cpp"
    "/usr/bin/objcopy" --set-section-flags .debug_str=contents,debug "../../../bin/boost/libs/smart_ptr/test/smart_ptr_test.test/gcc/debug/smart_ptr_test.o"

...failed gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/smart_ptr_test.test/gcc/debug/smart_ptr_test.o...
...removing ../../../bin/boost/libs/smart_ptr/test/smart_ptr_test.test/gcc/debug/smart_ptr_test.o
...skipped <@boost!libs!smart_ptr!test/smart_ptr_test.test/gcc/debug>smart_ptr_test for lack of <@boost!libs!smart_ptr!test/smart_ptr_test.test/gcc/debug>smart_ptr_test.o...
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_ptr_delete_fail.test/gcc/debug/shared_ptr_delete_fail.o
../../../libs/smart_ptr/test/shared_ptr_delete_fail.cpp: In function `int main()':
../../../libs/smart_ptr/test/shared_ptr_delete_fail.cpp:27: error: type `class boost::shared_ptr<int>' argument given to `delete', expected pointer
gcc-C++-action ../../../bin/boost/libs/smart_ptr/test/shared_ptr_assign_fail.test/gcc/debug/shared_ptr_assign_fail.o
../../../libs/smart_ptr/test/shared_ptr_assign_fail.cpp: In function `int main()':
../../../libs/smart_ptr/test/shared_ptr_assign_fail.cpp:32: error: no match for 'operator=' in 'p = (((int*)operator new(4u)), (((*<anonymous>) <unknown operator> 42), <anonymous>))'
/home/razeh/boost/boost/shared_ptr.hpp:146: note: candidates are: boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<T>&) [with T = int]
...skipped <@boost!libs!smart_ptr!test/smart_ptr_test.test/gcc/debug>smart_ptr_test.run for lack of <@boost!libs!smart_ptr!test/smart_ptr_test.test/gcc/debug>smart_ptr_test...
...removing outdated ../../../bin/boost/libs/smart_ptr/test/smart_ptr_test.test/gcc/debug/smart_ptr_test.test
...skipped <@boost!libs!smart_ptr!test/shared_ptr_basic_test.test/gcc/debug>shared_ptr_basic_test.run for lack of <@boost!libs!smart_ptr!test/shared_ptr_basic_test.test/gcc/debug>shared_ptr_basic_test...
...removing outdated ../../../bin/boost/libs/smart_ptr/test/shared_ptr_basic_test.test/gcc/debug/shared_ptr_basic_test.test
...skipped <@boost!libs!smart_ptr!test/shared_ptr_test.test/gcc/debug>shared_ptr_test.run for lack of <@boost!libs!smart_ptr!test/shared_ptr_test.test/gcc/debug>shared_ptr_test...
...removing outdated ../../../bin/boost/libs/smart_ptr/test/shared_ptr_test.test/gcc/debug/shared_ptr_test.test
...skipped <@boost!libs!smart_ptr!test/weak_ptr_test.test/gcc/debug>weak_ptr_test.run for lack of <@boost!libs!smart_ptr!test/weak_ptr_test.test/gcc/debug>weak_ptr_test...
...removing outdated ../../../bin/boost/libs/smart_ptr/test/weak_ptr_test.test/gcc/debug/weak_ptr_test.test
...skipped <@boost!libs!smart_ptr!test/shared_from_this_test.test/gcc/debug>shared_from_this_test.run for lack of <@boost!libs!smart_ptr!test/shared_from_this_test.test/gcc/debug>shared_from_this_test...
...removing outdated ../../../bin/boost/libs/smart_ptr/test/shared_from_this_test.test/gcc/debug/shared_from_this_test.test
...skipped <@boost!libs!smart_ptr!test/get_deleter_test.test/gcc/debug>get_deleter_test.run for lack of <@boost!libs!smart_ptr!test/get_deleter_test.test/gcc/debug>get_deleter_test...
...removing outdated ../../../bin/boost/libs/smart_ptr/test/get_deleter_test.test/gcc/debug/get_deleter_test.test
execute-test ../../../bin/boost/libs/smart_ptr/test/intrusive_ptr_test.test/gcc/debug/intrusive_ptr_test.run
**passed** ../../../bin/boost/libs/smart_ptr/test/intrusive_ptr_test.test/gcc/debug/intrusive_ptr_test.test
execute-test ../../../bin/boost/libs/smart_ptr/test/atomic_count_test.test/gcc/debug/atomic_count_test.run
**passed** ../../../bin/boost/libs/smart_ptr/test/atomic_count_test.test/gcc/debug/atomic_count_test.test
execute-test ../../../bin/boost/libs/smart_ptr/test/lw_mutex_test.test/gcc/debug/lw_mutex_test.run
**passed** ../../../bin/boost/libs/smart_ptr/test/lw_mutex_test.test/gcc/debug/lw_mutex_test.test
(failed-as-expected) ../../../bin/boost/libs/smart_ptr/test/shared_ptr_assign_fail.test/gcc/debug/shared_ptr_assign_fail.o
**passed** ../../../bin/boost/libs/smart_ptr/test/shared_ptr_assign_fail.test/gcc/debug/shared_ptr_assign_fail.test
(failed-as-expected) ../../../bin/boost/libs/smart_ptr/test/shared_ptr_delete_fail.test/gcc/debug/shared_ptr_delete_fail.o
**passed** ../../../bin/boost/libs/smart_ptr/test/shared_ptr_delete_fail.test/gcc/debug/shared_ptr_delete_fail.test
...failed updating 6 targets...
...skipped 18 targets...
...updated 15 targets...


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