Skip to content

Commit

Permalink
Fix narrowing conversions for ppc
Browse files Browse the repository at this point in the history
These constants are too large for `long long` so are unsigned,
and then cannot be narrowed to the signed type.

Fixes boostorg#29
  • Loading branch information
jwakely authored Jan 31, 2022
1 parent 53ba1b1 commit 0039878
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ typedef union {
double dmode;
} rounding_mode_struct;

static const rounding_mode_struct mode_upward = { 0xFFF8000000000002LL };
static const rounding_mode_struct mode_downward = { 0xFFF8000000000003LL };
static const rounding_mode_struct mode_to_nearest = { 0xFFF8000000000000LL };
static const rounding_mode_struct mode_toward_zero = { 0xFFF8000000000001LL };
static const rounding_mode_struct mode_upward = { (::boost::long_long_type)0xFFF8000000000002LL };
static const rounding_mode_struct mode_downward = { (::boost::long_long_type)0xFFF8000000000003LL };
static const rounding_mode_struct mode_to_nearest = { (::boost::long_long_type)0xFFF8000000000000LL };
static const rounding_mode_struct mode_toward_zero = { (::boost::long_long_type)0xFFF8000000000001LL };

struct ppc_rounding_control
{
Expand Down

0 comments on commit 0039878

Please sign in to comment.