gcc warning with "some variable may be used uninitialized in this function [-Wmaybe-uninitialized]" when building under msys

Tom Tromey tom@tromey.com
Thu Oct 4 12:41:00 GMT 2018

>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> I also see this from time to time.  I think it is a false positive,
Simon> but I may be wrong.  Do you see a code path that could actually be
Simon> problematic?

I think this is just that gcc doesn't know how to deal with
gdb::optional, and we aren't willing to add an initializer that would
slow down the generated code.  IIUC this is a problem with std::optional
as well.


More information about the Gdb mailing list