Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2003-06-12 06:06:35


> This discussion was a long time ago, but I didn't get the end of it.
> As building the thread library I get a lot of warnings I would like
> to remove them somehow (I'm using the 1.30 release version).
>
> So, what would you suggest? Using pragma's is safe enough?
> If yes, where is the best place to add this ?

Just for the record, the list of warnings from vc7.1 is rather long (see
below), it would be nice if we could fix these,

John.

------ Build started: Project: boost_thread, Configuration: Debug
Win32 ------

Compiling...

xtime.cpp

tss.cpp

c:\data\boost\develop\boost\boost\thread\tss.hpp(33) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::detail::tss'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\tss.hpp(32) : see declaration of
'boost::detail::tss'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(29) : warning C4275:
non dll-interface class 'std::logic_error' used as base for dll-interface
class 'boost::lock_error'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdexcept(14)
: see declaration of 'std::logic_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(28) : see
declaration of 'boost::lock_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(35) : warning C4275:
non dll-interface class 'std::runtime_error' used as base for dll-interface
class 'boost::thread_resource_error'

c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\stdexcept(136) : see declaration of 'std::runtime_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(34) : see
declaration of 'boost::thread_resource_error'

threadmon.cpp

thread.cpp

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(29) : warning C4275:
non dll-interface class 'std::logic_error' used as base for dll-interface
class 'boost::lock_error'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdexcept(14)
: see declaration of 'std::logic_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(28) : see
declaration of 'boost::lock_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(35) : warning C4275:
non dll-interface class 'std::runtime_error' used as base for dll-interface
class 'boost::thread_resource_error'

c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\stdexcept(136) : see declaration of 'std::runtime_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(34) : see
declaration of 'boost::thread_resource_error'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(37) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(36) : see declaration of
'boost::mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(75) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::try_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(74) : see declaration of
'boost::try_mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(115) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::timed_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(114) : see declaration of
'boost::timed_mutex'

c:\data\boost\develop\boost\boost\thread\thread.hpp(39) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(38) : see declaration of
'boost::thread'

c:\data\boost\develop\boost\boost\thread\thread.hpp(68) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread_group'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(67) : see declaration of
'boost::thread_group'

c:\data\boost\develop\boost\boost\thread\thread.hpp(79) : warning C4251:
'boost::thread_group::m_threads' : class 'std::list<_Ty>' needs to have
dll-interface to be used by clients of class 'boost::thread_group'

with

[

_Ty=boost::thread *

]

c:\data\boost\develop\boost\boost\thread\condition.hpp(38) : warning C4275:
non dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::detail::condition_impl'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\condition.hpp(37) : see declaration
of 'boost::detail::condition_impl'

recursive_mutex.cpp

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(29) : warning C4275:
non dll-interface class 'std::logic_error' used as base for dll-interface
class 'boost::lock_error'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdexcept(14)
: see declaration of 'std::logic_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(28) : see
declaration of 'boost::lock_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(35) : warning C4275:
non dll-interface class 'std::runtime_error' used as base for dll-interface
class 'boost::thread_resource_error'

c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\stdexcept(136) : see declaration of 'std::runtime_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(34) : see
declaration of 'boost::thread_resource_error'

c:\data\boost\develop\boost\boost\thread\recursive_mutex.hpp(35) : warning
C4275: non dll-interface class 'boost::noncopyable' used as base for
dll-interface class 'boost::recursive_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\recursive_mutex.hpp(34) : see
declaration of 'boost::recursive_mutex'

c:\data\boost\develop\boost\boost\thread\recursive_mutex.hpp(78) : warning
C4275: non dll-interface class 'boost::noncopyable' used as base for
dll-interface class 'boost::recursive_try_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\recursive_mutex.hpp(77) : see
declaration of 'boost::recursive_try_mutex'

c:\data\boost\develop\boost\boost\thread\recursive_mutex.hpp(124) : warning
C4275: non dll-interface class 'boost::noncopyable' used as base for
dll-interface class 'boost::recursive_timed_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\recursive_mutex.hpp(123) : see
declaration of 'boost::recursive_timed_mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(37) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(36) : see declaration of
'boost::mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(75) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::try_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(74) : see declaration of
'boost::try_mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(115) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::timed_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(114) : see declaration of
'boost::timed_mutex'

c:\data\boost\develop\boost\boost\thread\thread.hpp(39) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(38) : see declaration of
'boost::thread'

c:\data\boost\develop\boost\boost\thread\thread.hpp(68) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread_group'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(67) : see declaration of
'boost::thread_group'

c:\data\boost\develop\boost\boost\thread\thread.hpp(79) : warning C4251:
'boost::thread_group::m_threads' : class 'std::list<_Ty>' needs to have
dll-interface to be used by clients of class 'boost::thread_group'

with

[

_Ty=boost::thread *

]

c:\data\boost\develop\boost\libs\thread\src\recursive_mutex.cpp(71) :
warning C4267: '=' : conversion from 'size_t' to 'unsigned long', possible
loss of data

c:\data\boost\develop\boost\libs\thread\src\recursive_mutex.cpp(143) :
warning C4267: '=' : conversion from 'size_t' to 'unsigned long', possible
loss of data

c:\data\boost\develop\boost\libs\thread\src\recursive_mutex.cpp(252) :
warning C4267: '=' : conversion from 'size_t' to 'unsigned long', possible
loss of data

once.cpp

c:\data\boost\develop\boost\libs\thread\src\once.cpp(106) : warning C4312:
'type cast' : conversion from 'LONG' to 'LPVOID' of greater size

c:\data\boost\develop\boost\libs\thread\src\once.cpp(106) : warning C4312:
'type cast' : conversion from 'LONG' to 'LPVOID' of greater size

c:\data\boost\develop\boost\libs\thread\src\once.cpp(106) : warning C4311:
'type cast' : pointer truncation from 'LPVOID' to 'LONG'

mutex.cpp

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(29) : warning C4275:
non dll-interface class 'std::logic_error' used as base for dll-interface
class 'boost::lock_error'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdexcept(14)
: see declaration of 'std::logic_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(28) : see
declaration of 'boost::lock_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(35) : warning C4275:
non dll-interface class 'std::runtime_error' used as base for dll-interface
class 'boost::thread_resource_error'

c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\stdexcept(136) : see declaration of 'std::runtime_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(34) : see
declaration of 'boost::thread_resource_error'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(37) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(36) : see declaration of
'boost::mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(75) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::try_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(74) : see declaration of
'boost::try_mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(115) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::timed_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(114) : see declaration of
'boost::timed_mutex'

c:\data\boost\develop\boost\boost\thread\thread.hpp(39) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(38) : see declaration of
'boost::thread'

c:\data\boost\develop\boost\boost\thread\thread.hpp(68) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread_group'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(67) : see declaration of
'boost::thread_group'

c:\data\boost\develop\boost\boost\thread\thread.hpp(79) : warning C4251:
'boost::thread_group::m_threads' : class 'std::list<_Ty>' needs to have
dll-interface to be used by clients of class 'boost::thread_group'

with

[

_Ty=boost::thread *

]

exceptions.cpp

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(29) : warning C4275:
non dll-interface class 'std::logic_error' used as base for dll-interface
class 'boost::lock_error'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdexcept(14)
: see declaration of 'std::logic_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(28) : see
declaration of 'boost::lock_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(35) : warning C4275:
non dll-interface class 'std::runtime_error' used as base for dll-interface
class 'boost::thread_resource_error'

c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\stdexcept(136) : see declaration of 'std::runtime_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(34) : see
declaration of 'boost::thread_resource_error'

condition.cpp

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(29) : warning C4275:
non dll-interface class 'std::logic_error' used as base for dll-interface
class 'boost::lock_error'

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stdexcept(14)
: see declaration of 'std::logic_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(28) : see
declaration of 'boost::lock_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(35) : warning C4275:
non dll-interface class 'std::runtime_error' used as base for dll-interface
class 'boost::thread_resource_error'

c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\stdexcept(136) : see declaration of 'std::runtime_error'

c:\data\boost\develop\boost\boost\thread\exceptions.hpp(34) : see
declaration of 'boost::thread_resource_error'

c:\data\boost\develop\boost\boost\thread\condition.hpp(38) : warning C4275:
non dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::detail::condition_impl'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\condition.hpp(37) : see declaration
of 'boost::detail::condition_impl'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(37) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(36) : see declaration of
'boost::mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(75) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::try_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(74) : see declaration of
'boost::try_mutex'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(115) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::timed_mutex'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\mutex.hpp(114) : see declaration of
'boost::timed_mutex'

c:\data\boost\develop\boost\boost\thread\thread.hpp(39) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(38) : see declaration of
'boost::thread'

c:\data\boost\develop\boost\boost\thread\thread.hpp(68) : warning C4275: non
dll-interface class 'boost::noncopyable' used as base for dll-interface
class 'boost::thread_group'

c:\data\boost\develop\boost\boost\noncopyable.hpp(22) : see declaration of
'boost::noncopyable'

c:\data\boost\develop\boost\boost\thread\thread.hpp(67) : see declaration of
'boost::thread_group'

c:\data\boost\develop\boost\boost\thread\thread.hpp(79) : warning C4251:
'boost::thread_group::m_threads' : class 'std::list<_Ty>' needs to have
dll-interface to be used by clients of class 'boost::thread_group'

with

[

_Ty=boost::thread *

]

Generating Code...

Linking...

Creating library Debug/boost_thread.lib and object Debug/boost_thread.exp


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