[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Upgrading to gcc-4.9.2
From: |
Greg Chicares |
Subject: |
Re: [lmi] Upgrading to gcc-4.9.2 |
Date: |
Thu, 17 Dec 2015 18:35:23 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
On 2015-12-17 16:54, Vadim Zeitlin wrote:
> On Thu, 17 Dec 2015 15:39:25 +0000 Greg Chicares <address@hidden> wrote:
>
> GC> On 2015-12-17 02:28, Greg Chicares wrote:
> GC> [...some anomaly...] seems to go away with '-std=c++11'.
>
> Which is certainly the right compiler option to use in 2016.
Good. That's actually better than '-std=gnu++ANY_YEAR' because it's,
well, standard--whereas for MinGW gcc-3.4.5 we have this:
# Fix "hello world":
#
http://sourceforge.net/tracker/index.php?func=detail&aid=2373234&group_id=2435&atid=102435
cxx_standard := -std=gnu++98
> GC> I guess we'll reluctantly have to turn some of those warnings off
> GC> because they occur in 'boost' headers...unless we can replace those
> GC> headers with compiler-provided equivalents, or upgrade to a later
> GC> version of boost that compiles without warnings. Specifically:
> GC>
> GC> -Wno-unused-local-typedefs
> GC>
> GC> /opt/lmi/third_party/include/boost/static_assert.hpp:105:21: error: \
> GC> typedef ‘boost_static_assert_typedef_108’ locally defined but not \
> GC> used [-Werror=unused-local-typedefs]
> GC> BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
>
> This one is fixed in the latest Boost (I know because it occurs in all
> projects using Boost and I was sick and tired of seeing it).
That's good news.
> GC> -Wno-conversion
> GC>
> GC> /opt/lmi/third_party/include/boost/mpl/aux_/integral_wrapper.hpp:73:96:
> error: \
> GC> the result of the conversion is unspecified because ‘-1’ is outside the
> range of \
> GC> type ‘boost::numeric::int_float_mixture_enum’ [-Werror=conversion]
> GC>
> GC> -Wno-unused-variable
> GC>
> GC> /opt/lmi/third_party/include/boost/bind/placeholders.hpp:56:15: error: \
> GC> ‘{anonymous}::_3’ defined but not used [-Werror=unused-variable]
> GC>
> GC> boost::arg<3> _3;
>
> I don't know about those but I can test.
I'll gladly step aside and let you test a boost version change.
> GC> -Wno-deprecated-declarations
> GC>
> GC> /opt/lmi/third_party/src/libxml/node.cxx:284:33: error: \
> GC> ‘auto_ptr’ is deprecated (declared at
> /usr/lib/gcc/i686-w64-mingw32/4.9.2/include/c++/backward/auto_ptr.h:87)\
> GC> [-Werror=deprecated-declarations]
> GC> std::auto_ptr<node_impl> ap(pimpl_ = new node_impl);
> GC>
> GC> Perhaps Vaclav has changed xmlwrapp.
>
> No, but the change to (conditionally) use std::unique_ptr<> should be
> simple enough, I can do it.
Excellent.
> GC> -Wno-parentheses
> GC>
> GC> /lmi/src/lmi/value_cast.hpp:206:13: error: suggest parentheses around
> ‘&&’ within ‘||’ \
> GC> [-Werror=parentheses]
> GC>
> GC> This warning might be just noise. Here's the code:
> GC>
> GC> enum
> GC> {
> GC> one_numeric_one_string =
> GC> boost::is_arithmetic<From>::value && is_string<To
> >::value
> GC> || boost::is_arithmetic<To >::value &&
> is_string<From>::value
> GC> };
> GC>
> GC> It seems to warn against
> GC> a && b || c && d
> GC> but allow
> GC> a * b + c * d
> GC> and I think both are reasonable and should be accepted without any
> warning.
>
> I think both are reasonable but I also think it's simpler to add the
> parentheses to shut up the overbearing compiler rather than to spend time
> on examining each warning it gives in details and then spend even more time
> thinking about whether it's a good idea to disable it globally.
This is like '-Weffc++': it's good to run once in a great while,
because it might actually flag something significant; but then
you turn it off because it's just too noisy.
- Re: [lmi] Upgrading to gcc-4.9.2, (continued)
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Vadim Zeitlin, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/18
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2, Vadim Zeitlin, 2015/12/17
- Re: [lmi] Upgrading to gcc-4.9.2,
Greg Chicares <=
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/18
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/19
- Re: [lmi] Upgrading to gcc-4.9.2, Vadim Zeitlin, 2015/12/20
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/20
- Re: [lmi] Upgrading to gcc-4.9.2, Vadim Zeitlin, 2015/12/20
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/20
- Re: [lmi] Upgrading to gcc-4.9.2, Vadim Zeitlin, 2015/12/20
- Re: [lmi] Upgrading to gcc-4.9.2, Greg Chicares, 2015/12/20
- Re: [lmi] Upgrading to gcc-4.9.2, Vadim Zeitlin, 2015/12/20