From 2f279a64a27bca5be4393e84cbb579e18ef4a4ad Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Mon, 24 Jan 2022 17:56:23 +0000 Subject: Fix a proble building the libiberty library with gcc-12. PR 28779 * regex.c: Suppress -Wuse-after-free. --- libiberty/regex.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libiberty/regex.c') 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 -- cgit v1.1