Bug#1040524: libboost1.74-dev: g++-12 fails to compile interval.hpp on ppc64el: error: narrowing conversion

2023-07-12 Thread Gianfranco Costamagna

control: tags -1 patch fixed-upstream
control: forwarded -1 https://github.com/boostorg/interval/pull/30

Looks like upstream has a pull request fixing this issue.

G.

On Fri, 07 Jul 2023 11:25:45 +0200 Andreas Beckmann  wrote:

Package: libboost1.74-dev
Version: 1.74.0+ds1-21.1
Severity: serious

This is a regression from g++-11:

$ echo '#include ' | g++-11 -x c++ -c -
$ echo '#include ' | g++-12 -x c++ -c -
In file included from /usr/include/boost/numeric/interval/hw_rounding.hpp:28,
 from /usr/include/boost/numeric/interval.hpp:18,
 from :1:
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:31:56: 
error: narrowing conversion of '1892273895866370' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   31 | static const rounding_mode_struct mode_upward  = { 
0xFFF80002LL };
  |
^~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:32:56: 
error: narrowing conversion of '1892273895866371' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   32 | static const rounding_mode_struct mode_downward= { 
0xFFF80003LL };
  |
^~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:33:56: 
error: narrowing conversion of '1892273895866368' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   33 | static const rounding_mode_struct mode_to_nearest  = { 
0xFFF8LL };
  |
^~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:34:56: 
error: narrowing conversion of '1892273895866369' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   34 | static const rounding_mode_struct mode_toward_zero = { 
0xFFF80001LL };
  |
^~~~

The same behavior is observable with libboost1.81-dev.


Andreas




OpenPGP_signature
Description: OpenPGP digital signature


Bug#1040524: libboost1.74-dev: g++-12 fails to compile interval.hpp on ppc64el: error: narrowing conversion

2023-07-07 Thread Andreas Beckmann
Package: libboost1.74-dev
Version: 1.74.0+ds1-21.1
Severity: serious

This is a regression from g++-11:

$ echo '#include ' | g++-11 -x c++ -c -
$ echo '#include ' | g++-12 -x c++ -c -
In file included from /usr/include/boost/numeric/interval/hw_rounding.hpp:28,
 from /usr/include/boost/numeric/interval.hpp:18,
 from :1:
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:31:56: 
error: narrowing conversion of '1892273895866370' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   31 | static const rounding_mode_struct mode_upward  = { 
0xFFF80002LL };
  |
^~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:32:56: 
error: narrowing conversion of '1892273895866371' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   32 | static const rounding_mode_struct mode_downward= { 
0xFFF80003LL };
  |
^~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:33:56: 
error: narrowing conversion of '1892273895866368' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   33 | static const rounding_mode_struct mode_to_nearest  = { 
0xFFF8LL };
  |
^~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:34:56: 
error: narrowing conversion of '1892273895866369' from 'long long unsigned 
int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   34 | static const rounding_mode_struct mode_toward_zero = { 
0xFFF80001LL };
  |
^~~~

The same behavior is observable with libboost1.81-dev.


Andreas