When did -Wmaybe-unitialized make its appearance?

Jeffrey Walton noloader@gmail.com
Fri Jul 31 08:20:00 GMT 2015

We are catching a -Wmaybe-unitialized warning. We used Valgrind to
determine its OK to suppress the warning. (No complaints about the
warning itself; we'd rather know and be "better safe than sorry").

I'm having trouble determining when -Wmaybe-unitialized became
available. The following is producing a warning hydra:

// vmac.cpp:404:93: warning: ‘al2’ may be used uninitialized in this function
//    ... vmac.cpp:479:26: note: ‘al2’ was declared here
// Valgrind cleared this finding.
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"


c++ -DNDEBUG -g2 -O3 -fPIC -march=native -Wall -Wextra -pipe -c vmac.cpp
vmac.cpp:457:33: warning: unknown warning group '-Wmaybe-uninitialized', ignored
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"

I checked the GCC release notes for 5, 4.9, 4.8. 4.7, 4.6, 4.5 and
4.4, but I did not see it discussed or mentioned.

When did -Wmaybe-unitialized make its appearance?

More information about the Gcc-help mailing list