Building GDB 15.0.91 on MinGW: ui_out_emit_type<ui_out_type_tuple>::m_uiout

Eli Zaretskii eliz@gnu.org
Fri Jun 7 12:27:46 GMT 2024


While building GDB 15.0.91 on MinGW, I see several warnings like
below:

       CXX    breakpoint.o
     In file included from ././exceptions.h:23,
		      from ././utils.h:22,
		      from ././defs.h:408,
		      from <command-line>:
     ././ui-out.h: In function 'void print_one_breakpoint(breakpoint*, const bp_location**, int)':
     ././ui-out.h:415:18: warning: 'bkpt_tuple_emitter.ui_out_emit_type<ui_out_type_tuple>::m_uiout' may be used uninitialized in this function [-Wmaybe-uninitialized]
       415 |     m_uiout->end (Type);
	   |     ~~~~~~~~~~~~~^~~~~~
     breakpoint.c:6848:36: note: 'bkpt_tuple_emitter.ui_out_emit_type<ui_out_type_tuple>::m_uiout' was declared here
      6848 |   std::optional<ui_out_emit_tuple> bkpt_tuple_emitter (std::in_place, uiout,
	   |                                    ^~~~~~~~~~~~~~~~~~

Similar warnings are emitted in disasm.c, record-btrace.c, and
symtab.c.  They are all about
ui_out_emit_type<ui_out_type_tuple>::m_uiout and line 415 in ui-out.h.

How to avoid this warning?  Does it indicate a real problem in the
code?


More information about the Gdb-patches mailing list