This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

When did -Wmaybe-unitialized make its appearance?


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]