From 91caf37e4dfe862f9b68447b1597c0d0f31523c3 Mon Sep 17 00:00:00 2001
From: "Frank Ch. Eigler" <fche@redhat.com>
Date: Tue, 7 May 2024 15:04:04 -0400
Subject: [PATCH] elaborate.cxx: gcc version compatibility hack redux

Note __GNUC__ >= 14 for this diagnostic.

Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=91caf37e4dfe862f9b68447b1597c0d0f31523c3]
Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
---
 elaborate.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elaborate.cxx b/elaborate.cxx
index 88505559b..c08023f1d 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -2656,9 +2656,11 @@ symresolution_info::symresolution_info (systemtap_session& s, bool omniscient_un
   session (s), unmangled_p(omniscient_unmangled), current_function (0), current_probe (0)
 {
   #pragma GCC diagnostic push
+  #if __GNUC__ >= 14
   // c10s early snapshot GCC complains about this construct, which is
   // made safe via our dtor usage
   #pragma GCC diagnostic ignored "-Wdangling-pointer"
+  #endif
   saved_session_symbol_resolver = s.symbol_resolver;
   s.symbol_resolver = this; // save resolver for early PR25841 function resolution
   #pragma GCC diagnostic pop
-- 
2.45.2

