aboutsummaryrefslogtreecommitdiff
path: root/libiberty/regex.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2022-01-24 17:56:23 +0000
committerNick Clifton <nickc@redhat.com>2022-01-24 17:56:23 +0000
commit2f279a64a27bca5be4393e84cbb579e18ef4a4ad (patch)
tree1ce6973975e57656a8e191a931f2e00f74d748d5 /libiberty/regex.c
parent965c919f98ea394a333034d50831997c69feb1e5 (diff)
downloadgdb-2f279a64a27bca5be4393e84cbb579e18ef4a4ad.zip
gdb-2f279a64a27bca5be4393e84cbb579e18ef4a4ad.tar.gz
gdb-2f279a64a27bca5be4393e84cbb579e18ef4a4ad.tar.bz2
Fix a proble building the libiberty library with gcc-12.
PR 28779 * regex.c: Suppress -Wuse-after-free.
Diffstat (limited to 'libiberty/regex.c')
-rw-r--r--libiberty/regex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libiberty/regex.c b/libiberty/regex.c
index cc5a460..84af527 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -30,6 +30,10 @@
#pragma alloca
#endif
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wuse-after-free"
+#endif
+
#undef _GNU_SOURCE
#define _GNU_SOURCE