File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -193,8 +193,15 @@ class sharing_treet
193
193
// Copy from rvalue reference.
194
194
// Note that this does avoid a branch compared to the
195
195
// 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
196
202
sharing_treet (sharing_treet &&irep) : data(irep.data)
197
203
{
204
+ #pragma GCC diagnostic pop
198
205
#ifdef IREP_DEBUG
199
206
std::cout << " COPY MOVE\n " ;
200
207
#endif
@@ -233,7 +240,14 @@ class sharing_treet
233
240
234
241
~sharing_treet ()
235
242
{
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
236
249
remove_ref (data);
250
+ #pragma GCC diagnostic pop
237
251
}
238
252
239
253
protected:
You can’t perform that action at this time.
0 commit comments