* [PATCH] Include <array> in ui-style.h
@ 2026-08-26 15:32 Nikita.Venkatesh
2026-08-26 16:34 ` Andrew Burgess
0 siblings, 1 reply; 2+ messages in thread
From: Nikita.Venkatesh @ 2026-08-26 15:32 UTC (permalink / raw)
To: gdb-patches; +Cc: nd, Nikita Venkatesh
From: Nikita Venkatesh <Nikita.Venkatesh@arm.com>
ui-style.h uses std::array without including <array> directly.
This builds successfully with GCC 8 and libstdc++ as its <tuple> header
includes <array>. However, libc++'s <tuple> does not include <array> with
Apple Clang 13.0.0. This causes the GDB builds to fail on macOS with:
error: implicit instantiation of undefined template
'std::array<unsigned char, 3>'
Include <array> directly in ui-style.h rather than relying on the
include from <tuple>.
OK for trunk and gdb-18 branch?
---
gdb/ui-style.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/ui-style.h b/gdb/ui-style.h
index fc40b93709d..201a6f302d9 100644
--- a/gdb/ui-style.h
+++ b/gdb/ui-style.h
@@ -19,6 +19,8 @@
#ifndef GDB_UI_STYLE_H
#define GDB_UI_STYLE_H
+#include <array>
+
/* One of the color spaces that usually supported by terminals. */
enum class color_space
{
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Include <array> in ui-style.h
2026-08-26 15:32 [PATCH] Include <array> in ui-style.h Nikita.Venkatesh
@ 2026-08-26 16:34 ` Andrew Burgess
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2026-08-26 16:34 UTC (permalink / raw)
To: Nikita.Venkatesh, gdb-patches; +Cc: nd, Nikita Venkatesh
Nikita.Venkatesh@arm.com writes:
> From: Nikita Venkatesh <Nikita.Venkatesh@arm.com>
>
> ui-style.h uses std::array without including <array> directly.
>
> This builds successfully with GCC 8 and libstdc++ as its <tuple> header
> includes <array>. However, libc++'s <tuple> does not include <array> with
> Apple Clang 13.0.0. This causes the GDB builds to fail on macOS with:
>
> error: implicit instantiation of undefined template
> 'std::array<unsigned char, 3>'
>
> Include <array> directly in ui-style.h rather than relying on the
> include from <tuple>.
>
> OK for trunk and gdb-18 branch?
LGTM.
Approved-By: Andrew Burgess <aburgess@redhat.com>
thanks,
Andrew
> ---
> gdb/ui-style.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gdb/ui-style.h b/gdb/ui-style.h
> index fc40b93709d..201a6f302d9 100644
> --- a/gdb/ui-style.h
> +++ b/gdb/ui-style.h
> @@ -19,6 +19,8 @@
> #ifndef GDB_UI_STYLE_H
> #define GDB_UI_STYLE_H
>
> +#include <array>
> +
> /* One of the color spaces that usually supported by terminals. */
> enum class color_space
> {
> --
> 2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-26 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 15:32 [PATCH] Include <array> in ui-style.h Nikita.Venkatesh
2026-08-26 16:34 ` Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox