File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -193,8 +193,15 @@ class sharing_treet
193193 // Copy from rvalue reference.
194194 // Note that this does avoid a branch compared to the
195195 // standard copy constructor above.
196+ // Work around spurious GCC 12 warning about irep.data being uninitialized.
197+ // See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
198+ #pragma GCC diagnostic push
199+ #ifndef __clang__
200+ # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
201+ #endif
196202 sharing_treet (sharing_treet &&irep) : data(irep.data)
197203 {
204+ #pragma GCC diagnostic pop
198205#ifdef IREP_DEBUG
199206 std::cout << " COPY MOVE\n " ;
200207#endif
@@ -233,7 +240,14 @@ class sharing_treet
233240
234241 ~sharing_treet ()
235242 {
243+ // Work around spurious GCC 12 warning about irep.data being uninitialized.
244+ // See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
245+ #pragma GCC diagnostic push
246+ #ifndef __clang__
247+ # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
248+ #endif
236249 remove_ref (data);
250+ #pragma GCC diagnostic pop
237251 }
238252
239253protected:
You can’t perform that action at this time.
0 commit comments