mirror of
https://github.com/boostorg/core.git
synced 2025-05-09 23:03:54 +00:00
Fix GCC -Wlong-long warnings
This commit is contained in:
parent
b38c148969
commit
cf619432a7
@ -82,9 +82,9 @@ BOOST_CONSTEXPR inline int countl_impl( unsigned long x ) BOOST_NOEXCEPT
|
||||
return x? __builtin_clzl( x ): std::numeric_limits<unsigned long>::digits;
|
||||
}
|
||||
|
||||
BOOST_CONSTEXPR inline int countl_impl( unsigned long long x ) BOOST_NOEXCEPT
|
||||
BOOST_CONSTEXPR inline int countl_impl( boost::ulong_long_type x ) BOOST_NOEXCEPT
|
||||
{
|
||||
return x? __builtin_clzll( x ): std::numeric_limits<unsigned long long>::digits;
|
||||
return x? __builtin_clzll( x ): std::numeric_limits<boost::ulong_long_type>::digits;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
@ -224,9 +224,9 @@ BOOST_CONSTEXPR inline int countr_impl( unsigned long x ) BOOST_NOEXCEPT
|
||||
return x? __builtin_ctzl( x ): std::numeric_limits<unsigned long>::digits;
|
||||
}
|
||||
|
||||
BOOST_CONSTEXPR inline int countr_impl( unsigned long long x ) BOOST_NOEXCEPT
|
||||
BOOST_CONSTEXPR inline int countr_impl( boost::ulong_long_type x ) BOOST_NOEXCEPT
|
||||
{
|
||||
return x? __builtin_ctzll( x ): std::numeric_limits<unsigned long long>::digits;
|
||||
return x? __builtin_ctzll( x ): std::numeric_limits<boost::ulong_long_type>::digits;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
@ -365,7 +365,7 @@ BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned long x ) BOOST_
|
||||
return __builtin_popcountl( x );
|
||||
}
|
||||
|
||||
BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned long long x ) BOOST_NOEXCEPT
|
||||
BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( boost::ulong_long_type x ) BOOST_NOEXCEPT
|
||||
{
|
||||
return __builtin_popcountll( x );
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ int main()
|
||||
test_bit_ceil( static_cast<unsigned short>( 0 ) );
|
||||
test_bit_ceil( static_cast<unsigned int>( 0 ) );
|
||||
test_bit_ceil( static_cast<unsigned long>( 0 ) );
|
||||
test_bit_ceil( static_cast<unsigned long long>( 0 ) );
|
||||
test_bit_ceil( static_cast<boost::ulong_long_type>( 0 ) );
|
||||
}
|
||||
|
||||
{
|
||||
@ -58,7 +58,7 @@ int main()
|
||||
test_bit_ceil( static_cast<unsigned short>( x ) );
|
||||
test_bit_ceil( static_cast<unsigned int>( x ) );
|
||||
test_bit_ceil( static_cast<unsigned long>( x ) );
|
||||
test_bit_ceil( static_cast<unsigned long long>( x ) );
|
||||
test_bit_ceil( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
@ -27,7 +27,7 @@ int main()
|
||||
test_countl( static_cast<unsigned short>( 0 ) );
|
||||
test_countl( static_cast<unsigned int>( 0 ) );
|
||||
test_countl( static_cast<unsigned long>( 0 ) );
|
||||
test_countl( static_cast<unsigned long long>( 0 ) );
|
||||
test_countl( static_cast<boost::ulong_long_type>( 0 ) );
|
||||
|
||||
boost::detail::splitmix64 rng;
|
||||
|
||||
@ -39,7 +39,7 @@ int main()
|
||||
test_countl( static_cast<unsigned short>( x ) );
|
||||
test_countl( static_cast<unsigned int>( x ) );
|
||||
test_countl( static_cast<unsigned long>( x ) );
|
||||
test_countl( static_cast<unsigned long long>( x ) );
|
||||
test_countl( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
@ -27,7 +27,7 @@ int main()
|
||||
test_countr( static_cast<unsigned short>( 0 ) );
|
||||
test_countr( static_cast<unsigned int>( 0 ) );
|
||||
test_countr( static_cast<unsigned long>( 0 ) );
|
||||
test_countr( static_cast<unsigned long long>( 0 ) );
|
||||
test_countr( static_cast<boost::ulong_long_type>( 0 ) );
|
||||
|
||||
boost::detail::splitmix64 rng;
|
||||
|
||||
@ -39,7 +39,7 @@ int main()
|
||||
test_countr( static_cast<unsigned short>( x ) );
|
||||
test_countr( static_cast<unsigned int>( x ) );
|
||||
test_countr( static_cast<unsigned long>( x ) );
|
||||
test_countr( static_cast<unsigned long long>( x ) );
|
||||
test_countr( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::uint64_t v = static_cast<boost::uint64_t>( 0x0102030405060708ull );
|
||||
boost::uint64_t v = ( static_cast<boost::uint64_t>( 0x01020304u ) << 32 ) + 0x05060708u;
|
||||
|
||||
if( boost::core::endian::native == boost::core::endian::little )
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ int main()
|
||||
test_bit_floor( static_cast<unsigned short>( 0 ) );
|
||||
test_bit_floor( static_cast<unsigned int>( 0 ) );
|
||||
test_bit_floor( static_cast<unsigned long>( 0 ) );
|
||||
test_bit_floor( static_cast<unsigned long long>( 0 ) );
|
||||
test_bit_floor( static_cast<boost::ulong_long_type>( 0 ) );
|
||||
}
|
||||
|
||||
boost::detail::splitmix64 rng;
|
||||
@ -46,7 +46,7 @@ int main()
|
||||
test_bit_floor( static_cast<unsigned short>( x ) );
|
||||
test_bit_floor( static_cast<unsigned int>( x ) );
|
||||
test_bit_floor( static_cast<unsigned long>( x ) );
|
||||
test_bit_floor( static_cast<unsigned long long>( x ) );
|
||||
test_bit_floor( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
@ -26,7 +26,7 @@ int main()
|
||||
test_popcount( static_cast<unsigned short>( 0 ) );
|
||||
test_popcount( static_cast<unsigned int>( 0 ) );
|
||||
test_popcount( static_cast<unsigned long>( 0 ) );
|
||||
test_popcount( static_cast<unsigned long long>( 0 ) );
|
||||
test_popcount( static_cast<boost::ulong_long_type>( 0 ) );
|
||||
}
|
||||
|
||||
boost::detail::splitmix64 rng;
|
||||
@ -39,7 +39,7 @@ int main()
|
||||
test_popcount( static_cast<unsigned short>( x ) );
|
||||
test_popcount( static_cast<unsigned int>( x ) );
|
||||
test_popcount( static_cast<unsigned long>( x ) );
|
||||
test_popcount( static_cast<unsigned long long>( x ) );
|
||||
test_popcount( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
@ -152,7 +152,7 @@ int main()
|
||||
}
|
||||
|
||||
{
|
||||
unsigned long long x = 0;
|
||||
boost::ulong_long_type x = 0;
|
||||
BOOST_TEST_EQ( boost::core::rotl( x, i ), x );
|
||||
BOOST_TEST_EQ( boost::core::rotr( x, i ), x );
|
||||
}
|
||||
@ -168,7 +168,7 @@ int main()
|
||||
test_rotate( static_cast<unsigned short>( x ) );
|
||||
test_rotate( static_cast<unsigned int>( x ) );
|
||||
test_rotate( static_cast<unsigned long>( x ) );
|
||||
test_rotate( static_cast<unsigned long long>( x ) );
|
||||
test_rotate( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
@ -87,7 +87,7 @@ int main()
|
||||
test_width( static_cast<unsigned short>( x ) );
|
||||
test_width( static_cast<unsigned int>( x ) );
|
||||
test_width( static_cast<unsigned long>( x ) );
|
||||
test_width( static_cast<unsigned long long>( x ) );
|
||||
test_width( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
@ -103,7 +103,7 @@ int main()
|
||||
test_single_bit( static_cast<unsigned short>( x ) );
|
||||
test_single_bit( static_cast<unsigned int>( x ) );
|
||||
test_single_bit( static_cast<unsigned long>( x ) );
|
||||
test_single_bit( static_cast<unsigned long long>( x ) );
|
||||
test_single_bit( static_cast<boost::ulong_long_type>( x ) );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
Loading…
x
Reference in New Issue
Block a user