Skip to content

Commit

Permalink
Handle GCC warnings and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Nov 29, 2023
1 parent 0ac2b71 commit 79bea2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion math/wide_integer/uintwide_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#ifndef UINTWIDE_T_2018_10_02_H // NOLINT(llvm-header-guard)
#define UINTWIDE_T_2018_10_02_H

#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif

#if ((__cplusplus < 202100L) || (defined(__GNUC__) && defined(__AVR__)))
#include <ciso646>
#else
Expand Down Expand Up @@ -309,7 +313,6 @@
while(first != last)
{
using local_destination_value_type = typename iterator_detail::iterator_traits<DestinationIterator>::value_type;

#if (defined(__GNUC__) && (__GNUC__ > 9))
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
Expand Down Expand Up @@ -7920,4 +7923,8 @@

WIDE_INTEGER_NAMESPACE_END

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#endif // UINTWIDE_T_2018_10_02_H
4 changes: 2 additions & 2 deletions test/test_uintwide_t_edge_cases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2455,12 +2455,12 @@ extern test_uintwide_t_edge::local_uintwide_t_small_signed_type local_one_minu
auto test_uintwide_t_edge::one_as_small_unsigned_type() -> const test_uintwide_t_edge::local_uintwide_t_small_unsigned_type& { return local_one_plus_as_small_signed_type; }
auto test_uintwide_t_edge::m_one_as_small_signed_type() -> const test_uintwide_t_edge::local_uintwide_t_small_signed_type& { return local_one_minus_as_small_signed_type; }

test_uintwide_t_edge::local_uintwide_t_small_unsigned_type local_one_plus_as_small_signed_type
test_uintwide_t_edge::local_uintwide_t_small_unsigned_type local_one_plus_as_small_signed_type // NOLINT(cert-err58-cpp)
{
static_cast<std::make_signed_t<typename test_uintwide_t_edge::local_uintwide_t_small_signed_type::limb_type>>(UINT8_C(1))
};

test_uintwide_t_edge::local_uintwide_t_small_signed_type local_one_minus_as_small_signed_type
test_uintwide_t_edge::local_uintwide_t_small_signed_type local_one_minus_as_small_signed_type // NOLINT(cert-err58-cpp)
{
static_cast<std::make_signed_t<typename test_uintwide_t_edge::local_uintwide_t_small_signed_type::limb_type>>(INT8_C(-1))
};
Expand Down

0 comments on commit 79bea2c

Please sign in to comment.