Project

General

Profile

Bug #4545

Build fails with clang-6.0

Added by Davide Pesavento almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Build
Target version:
Start date:
03/10/2018
Due date:
% Done:

100%

Estimated time:

Description

clang-6.0 started warning about instances of the most vexing parse, e.g.:

[172/367] Compiling tests/unit-tests/key-locator.t.cpp
../tests/unit-tests/key-locator.t.cpp:54:36: error: parentheses were disambiguated as redundant parentheses around declaration of variable named 'wire' [-Werror,-Wvexing-parse]
  BOOST_REQUIRE_NO_THROW(KeyLocator(wire));
                                   ^~~~~~
/usr/include/boost/test/tools/old/interface.hpp:146:72: note: expanded from macro 'BOOST_REQUIRE_NO_THROW'
#define BOOST_REQUIRE_NO_THROW( S )         BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
                                                                       ^
/usr/include/boost/test/tools/old/interface.hpp:134:9: note: expanded from macro 'BOOST_CHECK_NO_THROW_IMPL'
        S;                                                                              \
        ^
../tests/unit-tests/key-locator.t.cpp:54:36: note: add a variable name to declare a 'ndn::KeyLocator' initialized with 'wire'
  BOOST_REQUIRE_NO_THROW(KeyLocator(wire));
                                   ^
                                    varname
/usr/include/boost/test/tools/old/interface.hpp:146:72: note: expanded from macro 'BOOST_REQUIRE_NO_THROW'
#define BOOST_REQUIRE_NO_THROW( S )         BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
                                                                       ^
/usr/include/boost/test/tools/old/interface.hpp:134:9: note: expanded from macro 'BOOST_CHECK_NO_THROW_IMPL'
        S;                                                                              \
        ^
../tests/unit-tests/key-locator.t.cpp:54:26: note: add enclosing parentheses to perform a function-style cast
  BOOST_REQUIRE_NO_THROW(KeyLocator(wire));
                         ^
                         (
/usr/include/boost/test/tools/old/interface.hpp:146:72: note: expanded from macro 'BOOST_REQUIRE_NO_THROW'
#define BOOST_REQUIRE_NO_THROW( S )         BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
                                                                       ^
/usr/include/boost/test/tools/old/interface.hpp:134:9: note: expanded from macro 'BOOST_CHECK_NO_THROW_IMPL'
        S;                                                                              \
        ^
../tests/unit-tests/key-locator.t.cpp:54:36: note: remove parentheses to silence this warning
  BOOST_REQUIRE_NO_THROW(KeyLocator(wire));
                                   ^    ~

/usr/include/boost/test/tools/old/interface.hpp:146:72: note: expanded from macro 'BOOST_REQUIRE_NO_THROW'
#define BOOST_REQUIRE_NO_THROW( S )         BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
                                                                       ^
/usr/include/boost/test/tools/old/interface.hpp:134:9: note: expanded from macro 'BOOST_CHECK_NO_THROW_IMPL'
        S;                                                                              \
        ^
#1

Updated by Davide Pesavento almost 3 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100
#2

Updated by Alex Afanasyev almost 3 years ago

  • Status changed from Code review to Closed

Also available in: Atom PDF