abseil / abseil/abseil-cpp

[Bug]: error: call of overloaded 'ldexp(long int, int)' is ambiguous

Đang mở
#1,824 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
18.1k
Fork
3.2k
Merge trung bình
20 giờ 36 phút
Pull request đã merge (30 ngày)
1

Mô tả

### Describe the issue

The compilation of abseil-cpp 20240116.3 fails on OpenIndiana with this error:

```
In file included from /usr/include/gtest/gtest.h:71,
from /data/builds/oi-userland/components/library/abseil-cpp/abseil-cpp-20240116.3/absl/strings/charconv_test.cc:25:
/data/builds/oi-userland/components/library/abseil-cpp/abseil-cpp-20240116.3/absl/strings/charconv_test.cc: In member function 'virtual void {anonymous}::FromChars_NearRoundingCasesExplicit_Test::TestBody()':
/data/builds/oi-userland/components/library/abseil-cpp/abseil-cpp-20240116.3/absl/strings/charconv_test.cc:183:38: error: call of overloaded 'ldexp(long int, int)' is ambiguous
183 | EXPECT_EQ(ToDouble("5.e125"), ldexp(6653062250012735, 365));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/math.h:35,
from /usr/gcc/14/include/c++/14.2.0/bits/std_abs.h:40,
from /usr/gcc/14/include/c++/14.2.0/cstdlib:81,
from /usr/gcc/14/include/c++/14.2.0/ext/string_conversions.h:43,
from /usr/gcc/14/include/c++/14.2.0/bits/basic_string.h:4154,
from /usr/gcc/14/include/c++/14.2.0/string:54,
from /usr/gcc/14/include/c++/14.2.0/stdexcept:39,
from /usr/gcc/14/include/c++/14.2.0/system_error:43,
from /data/builds/oi-userland/components/library/abseil-cpp/abseil-cpp-20240116.3/absl/strings/charconv.h:18,
from /data/builds/oi-userland/components/library/abseil-cpp/abseil-cpp-20240116.3/absl/strings/charconv_test.cc:15:
/usr/include/iso/math_iso.h:211:28: note: candidate: 'long double std::ldexp(long double, int)'
211 | inline long double ldexp(long double __X, int __Y) {
| ^~~~~
/usr/include/iso/math_iso.h:171:22: note: candidate: 'float std::ldexp(float, int)'
171 | inline float ldexp(float __X, int __Y) { return __ldexpf(__X, __Y); }
| ^~~~~
/usr/include/iso/math_iso.h:71:15: note: candidate: 'double std::ldexp(double, int)'
71 | extern double ldexp(double, int);
| ^~~~~
/data/builds/oi-userland/components/library/abseil-cpp/abseil-cpp-20240116.3/absl/strings/charconv_test.cc:184:39: error: call of overloaded 'ldexp(long int, int)' is ambiguous
184 | EXPECT_EQ(ToDouble("69.e267"), ldexp(4705683757438170, 841));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/iso/math_iso.h:211:28: note: candidate: 'long double std::ldexp(long double, int)'
211 | inline long double ldexp(long double __X, int __Y) {
| ^~~~~
/usr/include/iso/math_iso.h:171:22: note: candidate: 'float std::ldexp(float, int)'
171 | inline float ldexp(float __X, int __Y) { return __ldexpf(__X, __Y); }
| ^~~~~
/usr/include/iso/math_iso.h:71:15: note: candidate: 'double std::ldexp(double, int)'
71 | extern double ldexp(double, int);
| ^~~~~
```

### Steps to reproduce the problem

Compile abseil-cpp 20240116.3 with `-DABSL_BUILD_TESTING=ON` and `-DABSL_USE_EXTERNAL_GOOGLETEST=ON` on OpenIndiana.

### What version of Abseil are you using?

20240116.3

### What operating system and version are you using?

OpenIndiana (illumos distro)

### What compiler and version are you using?

```
$ gcc --version
gcc (OpenIndiana 14.2.0-oi-1) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$
```

### What build system are you using?

cmake version 3.31.5

### Additional context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.