This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
When did -Wmaybe-unitialized make its appearance?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 31 Jul 2015 04:20:05 -0400
- Subject: When did -Wmaybe-unitialized make its appearance?
- Authentication-results: sourceware.org; auth=none
- Reply-to: noloader at gmail dot com
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.
#if GCC_DIAGNOSTIC_AWARE
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
and:
c++ -DNDEBUG -g2 -O3 -fPIC -march=native -Wall -Wextra -pipe -c vmac.cpp
vmac.cpp:457:33: warning: unknown warning group '-Wmaybe-uninitialized', ignored
[-Wunknown-pragmas]
# 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?