Skip to content

Commit e93791b

Browse files
authored
Merge pull request #1280 from boostorg/cstdfloat_missed_pedantic
Add forgotten -Wpedantic shield
2 parents e1158bb + 801bf4d commit e93791b

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed

include/boost/math/cstdfloat/cstdfloat_cmath.hpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
#include <boost/math/cstdfloat/cstdfloat_types.hpp>
1616
#include <boost/math/cstdfloat/cstdfloat_limits.hpp>
1717

18+
#if (defined(__GNUC__) && defined(BOOST_HAS_FLOAT128))
19+
//
20+
// This is the only way we can avoid
21+
// warning: non-standard suffix on floating constant [-Wpedantic]
22+
// when building with -Wall -pedantic. Neither __extension__
23+
// nor #pragma diagnostic ignored work :(
24+
//
25+
#pragma GCC system_header
26+
#endif
27+
1828
#if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T) && defined(BOOST_MATH_USE_FLOAT128) && !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT)
1929

2030
#include <cstdint>
@@ -324,17 +334,17 @@ extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_
324334
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_HYPOT(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
325335
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ERF(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
326336
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ERFC(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
327-
extern "C" long long int BOOST_CSTDFLOAT_FLOAT128_LLROUND(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
328-
extern "C" long int BOOST_CSTDFLOAT_FLOAT128_LROUND(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
337+
extern "C" long long int BOOST_CSTDFLOAT_FLOAT128_LLROUND(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
338+
extern "C" long int BOOST_CSTDFLOAT_FLOAT128_LROUND(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
329339
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_ROUND(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
330340
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_NEARBYINT(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
331-
extern "C" long long int BOOST_CSTDFLOAT_FLOAT128_LLRINT(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
332-
extern "C" long int BOOST_CSTDFLOAT_FLOAT128_LRINT(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
341+
extern "C" long long int BOOST_CSTDFLOAT_FLOAT128_LLRINT(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
342+
extern "C" long int BOOST_CSTDFLOAT_FLOAT128_LRINT(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
333343
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_RINT(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
334344
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_MODF(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t*) BOOST_MATH_NOTHROW;
335345
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_SCALBLN(boost::math::cstdfloat::detail::float_internal128_t, long int) BOOST_MATH_NOTHROW;
336346
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_SCALBN(boost::math::cstdfloat::detail::float_internal128_t, int) BOOST_MATH_NOTHROW;
337-
extern "C" int BOOST_CSTDFLOAT_FLOAT128_ILOGB(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
347+
extern "C" int BOOST_CSTDFLOAT_FLOAT128_ILOGB(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
338348
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_LOGB(boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
339349
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_NEXTAFTER(boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;
340350
//extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_NEXTTOWARD (boost::math::cstdfloat::detail::float_internal128_t, boost::math::cstdfloat::detail::float_internal128_t) BOOST_MATH_NOTHROW;

include/boost/math/cstdfloat/cstdfloat_limits.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
// Implement quadruple-precision std::numeric_limits<> support.
1111

1212
#ifndef BOOST_MATH_CSTDFLOAT_LIMITS_2014_01_09_HPP_
13-
#define BOOST_MATH_CSTDFLOAT_LIMITS_2014_01_09_HPP_
13+
#define BOOST_MATH_CSTDFLOAT_LIMITS_2014_01_09_HPP_
1414

15-
#include <boost/math/cstdfloat/cstdfloat_types.hpp>
15+
#include <boost/math/cstdfloat/cstdfloat_types.hpp>
1616

17-
#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
18-
//
19-
// This is the only way we can avoid
20-
// warning: non-standard suffix on floating constant [-Wpedantic]
21-
// when building with -Wall -pedantic. Neither __extension__
22-
// nor #pragma diagnostic ignored work :(
23-
//
24-
#pragma GCC system_header
25-
#endif
17+
#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
18+
//
19+
// This is the only way we can avoid
20+
// warning: non-standard suffix on floating constant [-Wpedantic]
21+
// when building with -Wall -pedantic. Neither __extension__
22+
// nor #pragma diagnostic ignored work :(
23+
//
24+
#pragma GCC system_header
25+
#endif
2626

27-
#if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T) && defined(BOOST_MATH_USE_FLOAT128) && !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT) && (!defined(_GLIBCXX_RELEASE) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 14))
27+
#if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T) && defined(BOOST_MATH_USE_FLOAT128) && !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT) && (!defined(_GLIBCXX_RELEASE) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 14))
2828

2929
#include <limits>
3030
#include <boost/math/tools/nothrow.hpp>

0 commit comments

Comments
 (0)