Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost] compilation warnings questions by a newbee
From: Rai, Neeraj (neeraj.rai_at_[hidden])
Date: 2011-12-08 18:38:23


Hi Vincent,

You are right - the -Wconversion causes it to warn on that line. Is there any way to fix it ?
2 reasons : a) we are not allowed to have warnings in our code
                  b) I am going to miss the real warnings about conversion if I let this pass.
I just tried 1.48.0 with g++ 4.4.5 and 4.6 and same results. Without -Wconversion it is clean, but that is not an option for me.

Not sure what is PO ?

thx
Neeraj

________________________________
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Vicente J. Botet Escriba
Sent: Thursday, December 08, 2011 6:24 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [boost] compilation warnings questions by a newbee

Le 09/12/11 00:11, Marshall Clow a écrit :
On Dec 8, 2011, at 2:58 PM, Rai, Neeraj wrote:

Hi,

I am writing my first boost program and having trouble with the compiler warning against boost 1.44.0.
Is there any way to get rid of those warnings so I can focus on real warnings in my code ?
The gist of warning is :
        boost_1_44_0/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: warning: the result of the conversion is unspecified because '-0x00000000000000001' is outside the range of type 'boost::numeric::udt_builtin_mixture_enum' [-Wconversion]

Any help or pointers are appreciated.
Neeraj

====== The following program is a cut down version of my code, just declares sregex
#include <iostream>
#include <boost/xpressive/xpressive.hpp>

int main (int _argc, const char** _argv)
{
  std::cout << "argc=" << _argc << " argv=" << _argv << std::endl;
  using namespace boost::xpressive;
  std::string keyword("");
  sregex const re(sregex::compile(keyword, sregex::icase));
}

Just tried this with both gcc 4.2.1 and clang 3.0 using the current Boost (1.48), and it worked fine.
No warnings, even with -Wall

The PO is using -Wconversion

Best,
Vicente



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