Opened 6 years ago

Closed 6 years ago

#12204 closed Bugs (fixed)

Boost 1.61.0 mulitiprecision introduces warning on clang / OS X

Reported by: howard.hinnant@… Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.61.0 Severity: Regression
Keywords: Cc:

Description

This change:

https://github.com/boostorg/multiprecision/commit/df773c7ab293118eb29eac52067a0466431c9a96

Introduces these warnings on OS X / clang:

In file included from /Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/cpp_int.hpp:12:
In file included from /Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/number.hpp:22:
In file included from /Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/detail/generic_interconvert.hpp:9:
In file included from /Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/detail/default_ops.hpp:10:
/Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/detail/number_base.hpp:415:13: warning: conversion function converting
      'expression<type-parameter-0-0, type-parameter-0-1, void, void, void>' to 'void' will never be used
   explicit operator void()const {}
            ^
/Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/detail/number_base.hpp:479:13: warning: conversion function converting
      'expression<boost::multiprecision::detail::terminal, type-parameter-0-0, void, void, void>' to 'void' will never be used
   explicit operator void()const {}
            ^
/Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/detail/number_base.hpp:547:13: warning: conversion function converting
      'expression<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2, void, void>' to 'void' will never be used
   explicit operator void()const {}
            ^
/Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/detail/number_base.hpp:626:13: warning: conversion function converting
      'expression<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2, type-parameter-0-3, void>' to 'void' will never be used
   explicit operator void()const {}
            ^
/Users/howardhinnant/Development/boost_1_61_0/boost/multiprecision/detail/number_base.hpp:714:13: warning: conversion function converting
      'expression<tag, Arg1, Arg2, Arg3, Arg4>' to 'void' will never be used
   explicit operator void()const {}
            ^

Change History (3)

comment:1 by anonymous, 6 years ago

Component: Nonemultiprecision
Owner: set to John Maddock

comment:2 by howard.hinnant@…, 6 years ago

Also using clang 3.8 on linux this additional warning has been noted:

boost/multiprecision/cpp_int/bitwise.hpp:354:9: warning: unused variable 'truncated' [-Wunused-variable]
  bool truncated = result.size() != rs;

comment:3 by John Maddock, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.