Skip to content

Compiling fails with GCC 9.1 #232

@fanquake

Description

@fanquake

Compiling on Fedora 30 with GCC 9.1.1:

gcc --version
gcc (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm seeing:

[  2%] Building CXX object CMakeFiles/rapidcheck.dir/src/gen/Numeric.cpp.o
In file included from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.h:52,
                 from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:3,
                 from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.h:18,
                 from /bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/src/gen/Numeric.cpp:1:
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp: In instantiation of ‘T rc::detail::BitStream<Source>::next(int, std::false_type) [with T = long int; Source = rc::Random; std::false_type = std::integral_constant<bool, false>]’:
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:30:48:   required from ‘T rc::detail::BitStream<Source>::next(int) [with T = long int; Source = rc::Random]’
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:86:75:   required from ‘T rc::detail::BitStream<Source>::nextWithSize(int) [with T = long int; Source = rc::Random]’
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:44:68:   required from ‘rc::Shrinkable<T> rc::gen::detail::real(const rc::Random&, int) [with T = long double]’
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:80:48:   required from here
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:63:36: error: comparison of integer expressions of different signedness: ‘SourceType’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
   63 |     if (static_cast<SourceType>(n) < numBits<SourceType>()) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp: In instantiation of ‘T rc::detail::BitStream<Source>::next(int, std::false_type) [with T = long unsigned int; Source = rc::Random; std::false_type = std::integral_constant<bool, false>]’:
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:30:48:   required from ‘T rc::detail::BitStream<Source>::next(int) [with T = long unsigned int; Source = rc::Random]’
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/detail/BitStream.hpp:24:30:   required from ‘T rc::detail::BitStream<Source>::next() [with T = long unsigned int; Source = rc::Random]’
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:46:29:   required from ‘rc::Shrinkable<T> rc::gen::detail::real(const rc::Random&, int) [with T = long double]’
/bitcoin/depends/work/build/x86_64-pc-linux-gnu/rapidcheck/3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3-087dffe9a0a/include/rapidcheck/gen/Numeric.hpp:80:48:   required from here
<... snip a bunch of similar output ...>
cc1plus: error: unrecognized command line option ‘-Wno-unused-command-line-argument’ [-Werror]
cc1plus: all warnings being treated as errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions