This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: When did -Wmaybe-unitialized make its appearance?
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: Jeffrey Walton <noloader at gmail dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 31 Jul 2015 10:27:46 +0200
- Subject: Re: When did -Wmaybe-unitialized make its appearance?
- Authentication-results: sourceware.org; auth=none
- References: <CAH8yC8k41KRc-Qq5WyKHs3QkqSe4druFTVA0WbJKSOBiyu_nrA at mail dot gmail dot com>
On 2015.07.31 at 04:20 -0400, Jeffrey Walton wrote:
> 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?
The svn or git repositories are publicly available. They should give you
the answer.
--
Markus