[binutils-gdb] gdb: fix build failure on armhf
Matthieu Longo via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=90d06836df5a36aa61768bd39cde0a568c69fac7 commit 90d06836df5a36aa61768bd39cde0a568c69fac7 Author: Matthieu Longo <[email protected]> Date: Thu Mar 12 10:18:59 2026 +0000 gdb: fix build failure on armhf armhf build fails because the implicit conversion operator from rgb_color to `uint8_t *' introduces an ambiguity. In ./gdb/tui/tui-io.c, expressions such as: init_color (next, rgb[0] * 1000 / 255, rgb[1] * 1000 / 255, ... become ambiguous between: constexpr uint8_t& rgb_color::operator[](std::size_t)’ operator[](uint8_t* {aka unsigned char*}, int) (built-in) leading to a build error: error: ISO C++ says that these are ambiguous Fix the issue by removing the unused implicit conversion operator. Approved-By: Simon Marchi <[email protected]> Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/ui-style.h | 1 - 1 file changed, 1 deletion(-) diff --git a/gdb/ui-style.h b/gdb/ui-style.h index a1d656cd39c..fc40b93709d 100644 --- a/gdb/ui-style.h +++ b/gdb/ui-style.h @@ -72,7 +72,6 @@ public: constexpr uint8_t g () const noexcept { return m_data[1]; } constexpr uint8_t b () const noexcept { return m_data[2]; } - constexpr operator uint8_t *() noexcept { return m_data.data (); } constexpr size_t size () const noexcept { return m_data.size (); } constexpr uint8_t &operator[] (std::size_t idx) noexcept