Boost logo

Boost Users :

Subject: Re: [Boost-users] How to disable warnings on gcc?
From: Jean-Pierre Bergamin (james_at_[hidden])
Date: 2010-08-24 15:33:21


Hello

Am 24.08.2010, 19:05 Uhr, schrieb John Maddock <boost.regex_at_[hidden]>:
>> On FreeBSD 8.1 with boost 1.43 and gcc 4.2.1 we have lots of warnings
>> like:
>>
>> ...
>> /usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation
>> of 'boost::detail::is_ununsigned_helper<short int>':
>> /usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
>> from 'boost::detail::is_unsigned_imp<short int>'
>> /usr/local/include/boost/type_traits/is_unsigned.hpp:123:
>> instantiated from 'boost::is_unsigned<short int>'
>> /usr/local/include/boost/type_traits/make_unsigned.hpp:110:
>> instantiated from 'boost::detail::make_unsigned_imp<short int>'
>> /usr/local/include/boost/type_traits/make_unsigned.hpp:130:
>> instantiated from 'boost::make_unsigned<short int>'
>> /usr/local/include/boost/lexical_cast.hpp:846: instantiated from here
>> /usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
>> comparison between 'enum boost::detail::is_unsigned_values<short
>> int>::<anonymous>' and 'enum boost::detail::is_unsigned_values<short
>> int>::<anonymous>'
>
> I'm not able to reproduce that with cygwin-gcc-4.3.4 and -Wall -Wextra
> -pedantic and either Boost-1.44 or 1.43, do you have a minimal test case?
>
> It also looks to me that maybe BOOST_NO_INCLASS_MEMBER_INITIALIZATION is
> defined given that the warning talks about enum's - however this should
> never be the case with gcc.

These warnings appear by just including lexical_cast.hpp (see below). Any
ideas where the warnings come from?
Tomorrow I'll try to use another gcc version and/or another boost version.

Regards
James

[james_at_build-amd64-81 ~]$ cat warnings.cpp
#include <boost/lexical_cast.hpp>

int main() {

}

[james_at_build-amd64-81 ~]$ c++ -I/usr/local/include warnings.cpp
In file included from warnings.cpp:1:
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<short int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
 from 'boost::detail::is_unsigned_imp<short int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
 from 'boost::is_unsigned<short int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
 from 'boost::detail::make_unsigned_imp<short int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
 from 'boost::make_unsigned<short int>'
/usr/local/include/boost/lexical_cast.hpp:846: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum boost::detail::is_unsigned_values<short
int>::<anonymous>' and 'enum boost::detail::is_unsigned_values<short
int>::<anonymous>'
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
 from 'boost::detail::is_unsigned_imp<int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
 from 'boost::is_unsigned<int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
 from 'boost::detail::make_unsigned_imp<int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
 from 'boost::make_unsigned<int>'
/usr/local/include/boost/lexical_cast.hpp:860: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum
boost::detail::is_unsigned_values<int>::<anonymous>' and 'enum
boost::detail::is_unsigned_values<int>::<anonymous>'
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<long int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
 from 'boost::detail::is_unsigned_imp<long int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
 from 'boost::is_unsigned<long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
 from 'boost::detail::make_unsigned_imp<long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
 from 'boost::make_unsigned<long int>'
/usr/local/include/boost/lexical_cast.hpp:874: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum boost::detail::is_unsigned_values<long
int>::<anonymous>' and 'enum boost::detail::is_unsigned_values<long
int>::<anonymous>'
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<long long int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
 from 'boost::detail::is_unsigned_imp<long long int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
 from 'boost::is_unsigned<long long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
 from 'boost::detail::make_unsigned_imp<long long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
 from 'boost::make_unsigned<long long int>'
/usr/local/include/boost/lexical_cast.hpp:889: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum boost::detail::is_unsigned_values<long long
int>::<anonymous>' and 'enum boost::detail::is_unsigned_values<long long
int>::<anonymous>'


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