Fix a proble building the libiberty library with gcc-12.
authorMartin Sebor <msebor@redhat.com>
Mon, 24 Jan 2022 17:56:23 +0000 (17:56 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 24 Jan 2022 17:56:23 +0000 (17:56 +0000)
PR 28779
* regex.c: Suppress -Wuse-after-free.

libiberty/ChangeLog
libiberty/regex.c

index 04c9e90a45b7b02a441d5dc8484f9341e903a507..40611e56ff4713dd3883ea56069c3611f31d6b1e 100644 (file)
@@ -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.
index cc5a4605cedaa5852d25554f42651339d8095b41..84af5276ae817bea902d1009df025daa49d32a1e 100644 (file)
   #pragma alloca
 #endif
 
+#if __GNUC__ >= 12
+#  pragma GCC diagnostic ignored "-Wuse-after-free"
+#endif
+
 #undef _GNU_SOURCE
 #define _GNU_SOURCE