Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [gdb] Disable Wstringop-overflow
@ 2026-11-01 16:09 Tom de Vries
  2026-11-20 15:24 ` Tom de Vries
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2026-11-01 16:09 UTC (permalink / raw)
  To: gdb-patches

Recently I submitted a few patches fixing Wstringop-overflow warnings [1][2]
and a patch adding Wno-error=stringop-overflow [3].

All of these patches were dealing with false positives.

A review comment [4] suggested going one step further: to disable the warning.

This patch implements that approach.

Tested on x86_64-linux.

[1] https://sourceware.org/pipermail/gdb-patches/2026-November/231551.html
[2] https://sourceware.org/pipermail/gdb-patches/2026-October/231432.html
[3] https://sourceware.org/pipermail/gdb-patches/2026-October/231431.html
[4] https://sourceware.org/pipermail/gdb-patches/2026-October/231438.html
---
 gdb/configure         | 1 +
 gdbserver/configure   | 1 +
 gdbsupport/configure  | 1 +
 gdbsupport/warning.m4 | 1 +
 4 files changed, 4 insertions(+)

diff --git a/gdb/configure b/gdb/configure
index e747ffce49f..340aeb4a715 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -31161,6 +31161,7 @@ build_warnings=" \
 -Wno-error=deprecated-register \
 -Wno-mismatched-tags \
 -Wno-sign-compare -Wno-error=maybe-uninitialized \
+-Wno-stringop-overflow \
 -Wno-switch \
 -Wno-unused \
 -Wpointer-arith \
diff --git a/gdbserver/configure b/gdbserver/configure
index e00e1e1c1c5..e0d4abf2725 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -12891,6 +12891,7 @@ build_warnings=" \
 -Wno-error=deprecated-register \
 -Wno-mismatched-tags \
 -Wno-sign-compare -Wno-error=maybe-uninitialized \
+-Wno-stringop-overflow \
 -Wno-switch \
 -Wno-unused \
 -Wpointer-arith \
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 7ed4e259ffe..2ded3338d88 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -13894,6 +13894,7 @@ build_warnings=" \
 -Wno-error=deprecated-register \
 -Wno-mismatched-tags \
 -Wno-sign-compare -Wno-error=maybe-uninitialized \
+-Wno-stringop-overflow \
 -Wno-switch \
 -Wno-unused \
 -Wpointer-arith \
diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
index 3148feb740a..07dd6ee72f4 100644
--- a/gdbsupport/warning.m4
+++ b/gdbsupport/warning.m4
@@ -49,6 +49,7 @@ build_warnings=" \
 -Wno-error=deprecated-register \
 -Wno-mismatched-tags \
 -Wno-sign-compare -Wno-error=maybe-uninitialized \
+-Wno-stringop-overflow \
 -Wno-switch \
 -Wno-unused \
 -Wpointer-arith \

base-commit: 8614f56cb2598044f6f9b60fe551883d26bf7465
-- 
2.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [gdb] Disable Wstringop-overflow
  2026-11-01 16:09 [PATCH] [gdb] Disable Wstringop-overflow Tom de Vries
@ 2026-11-20 15:24 ` Tom de Vries
  0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2026-11-20 15:24 UTC (permalink / raw)
  To: gdb-patches

On 11/1/26 5:09 PM, Tom de Vries wrote:
> Recently I submitted a few patches fixing Wstringop-overflow warnings [1][2]
> and a patch adding Wno-error=stringop-overflow [3].
> 
> All of these patches were dealing with false positives.
> 
> A review comment [4] suggested going one step further: to disable the warning.
> 
> This patch implements that approach.
> 

I'm gonna go ahead and commit this.

The first link is incorrect though, so I fixed that one.

While reading about the warning, I came across the fact that the linux 
kernel has disabled the warning in 6.8 due to false positives ( 
https://www.phoronix.com/news/Linux-Drop-GCC--Wstringop-of ).

Thanks,
- Tom

> Tested on x86_64-linux.
> 
> [1] https://sourceware.org/pipermail/gdb-patches/2026-November/231551.html
> [2] https://sourceware.org/pipermail/gdb-patches/2026-October/231432.html
> [3] https://sourceware.org/pipermail/gdb-patches/2026-October/231431.html
> [4] https://sourceware.org/pipermail/gdb-patches/2026-October/231438.html
> ---
>   gdb/configure         | 1 +
>   gdbserver/configure   | 1 +
>   gdbsupport/configure  | 1 +
>   gdbsupport/warning.m4 | 1 +
>   4 files changed, 4 insertions(+)
> 
> diff --git a/gdb/configure b/gdb/configure
> index e747ffce49f..340aeb4a715 100755
> --- a/gdb/configure
> +++ b/gdb/configure
> @@ -31161,6 +31161,7 @@ build_warnings=" \
>   -Wno-error=deprecated-register \
>   -Wno-mismatched-tags \
>   -Wno-sign-compare -Wno-error=maybe-uninitialized \
> +-Wno-stringop-overflow \
>   -Wno-switch \
>   -Wno-unused \
>   -Wpointer-arith \
> diff --git a/gdbserver/configure b/gdbserver/configure
> index e00e1e1c1c5..e0d4abf2725 100755
> --- a/gdbserver/configure
> +++ b/gdbserver/configure
> @@ -12891,6 +12891,7 @@ build_warnings=" \
>   -Wno-error=deprecated-register \
>   -Wno-mismatched-tags \
>   -Wno-sign-compare -Wno-error=maybe-uninitialized \
> +-Wno-stringop-overflow \
>   -Wno-switch \
>   -Wno-unused \
>   -Wpointer-arith \
> diff --git a/gdbsupport/configure b/gdbsupport/configure
> index 7ed4e259ffe..2ded3338d88 100755
> --- a/gdbsupport/configure
> +++ b/gdbsupport/configure
> @@ -13894,6 +13894,7 @@ build_warnings=" \
>   -Wno-error=deprecated-register \
>   -Wno-mismatched-tags \
>   -Wno-sign-compare -Wno-error=maybe-uninitialized \
> +-Wno-stringop-overflow \
>   -Wno-switch \
>   -Wno-unused \
>   -Wpointer-arith \
> diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
> index 3148feb740a..07dd6ee72f4 100644
> --- a/gdbsupport/warning.m4
> +++ b/gdbsupport/warning.m4
> @@ -49,6 +49,7 @@ build_warnings=" \
>   -Wno-error=deprecated-register \
>   -Wno-mismatched-tags \
>   -Wno-sign-compare -Wno-error=maybe-uninitialized \
> +-Wno-stringop-overflow \
>   -Wno-switch \
>   -Wno-unused \
>   -Wpointer-arith \
> 
> base-commit: 8614f56cb2598044f6f9b60fe551883d26bf7465


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-20 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-01 16:09 [PATCH] [gdb] Disable Wstringop-overflow Tom de Vries
2026-11-20 15:24 ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox