Skip to content

Commit 15f7232

Browse files
committed
Ignore type-limits warning
1 parent 57426c6 commit 15f7232

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/boost/decimal/detail/locale_conversion.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ namespace boost {
1515
namespace decimal {
1616
namespace detail {
1717

18+
// GCC-9 issues an erroneous warning for char == -30 being outside of type limits
19+
#if defined(__GNUC__) && __GNUC__ == 9
20+
# pragma GCC diagnostic push
21+
# pragma GCC diagnostic ignored "-Wtype-limits"
22+
#endif
23+
1824
inline void convert_string_to_c_locale(char* buffer, const std::locale& loc) noexcept
1925
{
2026
const std::numpunct<char>& np = std::use_facet<std::numpunct<char>>(loc);
@@ -177,6 +183,10 @@ inline int convert_pointer_pair_to_local_locale(char* first, char* last, const s
177183
return num_separators;
178184
}
179185

186+
#if defined(__GNUC__) && __GNUC__ == 9
187+
# pragma GCC diagnostic pop
188+
#endif
189+
180190
inline int convert_pointer_pair_to_local_locale(char* first, char* last)
181191
{
182192
const auto loc {std::locale()};

0 commit comments

Comments
 (0)