Boost Test - yet more mostly spurious warnings.

To get quiet compilations (MSVC 8.0 release 140050727, level 4, no MS extensions), I have had to disable persistent warnings from boost\test\detail\test_tools.hpp by adding to supress_warning.hpp # pragma warning(disable: 4127) // conditional expression is constant. Entirely correct and expected. # pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored at: const_string message() const { return !m_message ? const_string() : const_string( m_message->str() ); } ^^ const not useful? but not wrong. # pragma warning(disable: 4224) // nonstandard extension used : formal parameter 'tool_level' was previously defined as a type i:\boost_1_33_0\boost/test/test_tools.hpp(385) : warning C4224: nonstandard extension used : formal parameter 'tool_level' was previously defined as a type i:\boost_1_33_0\boost/test/test_tools.hpp(427) : warning C4224: nonstandard extension used : formal parameter 'tool_level' was previously defined as a type i:\boost_1_33_0\boost/test/test_tools.hpp(427) : warning C4224: nonstandard extension used : formal parameter 'tool_level' was previously defined as a type i:\boost_1_33_0\boost/test/test_tools.hpp(427) : warning C4224: nonstandard extension used : formal parameter 'tool_level' was previously defined as a type i:\boost_1_33_0\boost/test/test_tools.hpp(427) : warning C4224: nonstandard extension used : formal parameter 'tool_level' was previously defined as a type i:\boost_1_33_0\boost/test/test_tools.hpp(427) : warning C4224: nonstandard extension used : formal parameter 'tool_level' was previously defined as a type Is it complaining about re-using the name tool_level? void check_impl( predicate_result const& pr, wrap_stringstream& check_descr, const_string file_name, std::size_t line_num, tool_level tool_level, check_type ct, <<<<<<<<<<<<<< std::size_t num_args, ... ); Of these, only the latter might be worth worrying about? Still works fine, but if you are tidying up sometime... Paul -- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204 mailto: pbristow@hetp.u-net.com www.hetp.u-net.com

# pragma warning(disable: 4127) // conditional expression is constant. Entirely correct and expected.
Is it from lexical_cast?
# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
at: const_string message() const { return !m_message ? const_string() : const_string( m_message->str() ); }
^^ const not useful? but not wrong.
Sorry, where is qualifier?
# pragma warning(disable: 4224) // nonstandard extension used : formal parameter 'tool_level' was previously defined as a type
Is it complaining about re-using the name tool_level?
void check_impl( predicate_result const& pr, wrap_stringstream& check_descr, const_string file_name, std::size_t line_num, tool_level tool_level, check_type ct, <<<<<<<<<<<<<< std::size_t num_args, ... );
Of these, only the latter might be worth worrying about?
That I will fix. Gennadiy

| -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of Gennadiy Rozental | Sent: 11 November 2005 18:45 | To: boost@lists.boost.org | Subject: Re: [boost] Boost Test - yet more mostly spurious warnings. | | > # pragma warning(disable: 4127) // conditional expression is constant. | Is it from lexical_cast? No I think calculation from numeric_limits - looks entirely expected to me. | > # pragma warning(disable: 4180) // qualifier applied to | function type has | > no | > meaning; ignored | > | > at: | > const_string message() const { return !m_message ? | const_string() : | > const_string( m_message->str() ); } | > | > ^^ const not useful? but not wrong. | | Sorry, where is qualifier? Is it objecting to the const? const_string message() const shall I try removing it? | > # pragma warning(disable: 4224) // nonstandard extension used : ... | That I will fix. Thanks Paul -- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204 mailto: pbristow@hetp.u-net.com www.hetp.u-net.com

| > # pragma warning(disable: 4180) // qualifier applied to | function type has | > no | > meaning; ignored | > | > at: | > const_string message() const { return !m_message ? | const_string() : | > const_string( m_message->str() ); } | > | > ^^ const not useful? but not wrong. | | Sorry, where is qualifier?
Is it objecting to the const?
const_string message() const
shall I try removing it?
It doesn't make any sence. class predicate_result has a non-const method mesage() already with completely different semantic. You couldn't and shouldn't remove const there. And this qualifier has a well defined meaning. Gennadiy

Well please don't shoot the messenger! Suggest you leave it for now. Await other reports? Works fine. Only an annoyance for pedants that use warning level 4 I think. Paul | -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of Gennadiy Rozental | Sent: 13 November 2005 03:03 | To: boost@lists.boost.org | Subject: Re: [boost] Boost Test - yet more mostly spurious warnings. | | > | > # pragma warning(disable: 4180) // qualifier applied to | > | function type has | > | > no | > | > meaning; ignored | > | > | > | > at: | > | > const_string message() const { return !m_message ? | > | const_string() : | > | > const_string( m_message->str() ); } | > | > | > | > ^^ const not useful? but not wrong. | > | | > | Sorry, where is qualifier? | > | > Is it objecting to the const? | > | > const_string message() const | > | > shall I try removing it? | | It doesn't make any sence. class predicate_result has a | non-const method | mesage() already with completely different semantic. You couldn't and | shouldn't remove const there. And this qualifier has a well | defined meaning. | | Gennadiy
participants (2)
-
Gennadiy Rozental
-
Paul A Bristow