From: Martin Sebor Date: Mon, 24 Jan 2022 17:56:23 +0000 (+0000) Subject: Fix a proble building the libiberty library with gcc-12. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f279a64a27bca5be4393e84cbb579e18ef4a4ad;p=binutils-gdb.git Fix a proble building the libiberty library with gcc-12. PR 28779 * regex.c: Suppress -Wuse-after-free. --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 04c9e90a45b..40611e56ff4 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2022-01-15 Martin Sebor + + * regex.c: Suppress -Wuse-after-free. + 2022-01-22 Nick Clifton * 2.38 release branch created. diff --git a/libiberty/regex.c b/libiberty/regex.c index cc5a4605ced..84af5276ae8 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