diff options
author | Martin Sebor <msebor@redhat.com> | 2022-01-24 17:56:23 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-01-24 17:56:23 +0000 |
commit | 2f279a64a27bca5be4393e84cbb579e18ef4a4ad (patch) | |
tree | 1ce6973975e57656a8e191a931f2e00f74d748d5 /libiberty | |
parent | 965c919f98ea394a333034d50831997c69feb1e5 (diff) | |
download | gdb-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')
-rw-r--r-- | libiberty/ChangeLog | 4 | ||||
-rw-r--r-- | libiberty/regex.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 04c9e90..40611e5 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2022-01-15 Martin Sebor <msebor@redhat.com> + + * regex.c: Suppress -Wuse-after-free. + 2022-01-22 Nick Clifton <nickc@redhat.com> * 2.38 release branch created. 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 |