This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [rant?] g++ bug (missing uninitialized warning), bug reporting, bug searching
- From: Xinliang David Li <davidxl at google dot com>
- To: Bruno Nery <bruno at thousandeyes dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 9 Nov 2012 12:32:07 -0800
- Subject: Re: [rant?] g++ bug (missing uninitialized warning), bug reporting, bug searching
- References: <CACs3pfqjcHbZhdg5O3CrnW2YmoWfHfZ3SmK65_=DFGy7+w0FRA@mail.gmail.com>
GCC has the -Winit-self warning.
David
On Fri, Nov 9, 2012 at 12:18 PM, Bruno Nery <bruno@thousandeyes.com> wrote:
> Howdy,
>
> The following piece of code:
>
> === snip ===
> #include <iostream>
>
> struct warnme
> {
> bool member_;
> warnme(bool member) : member_(member_) {}
> };
>
> int main()
> {
> warnme wm(true);
> std::cout << wm.member_ << std::endl;
> return 0;
> }
> === end snip ===
>
> when compiled with g++ 4.7, gives me no warnings - even with
> -Wuninitialized (clang++ 3.1 is fine, by the way). I then decided to
> report a bug, but:
>
> - I need to login to report a bug, and I have to create an account. Is
> this a way to reduce the number of bugs GCC gets?
> - I searched for uninitialized and got 156 bugs. How easy would it be
> for one to check if a bug is a duplicate? Shouldn't we have some kind
> of code search for bug-related snippets?
>
> best,
>
> --
> Bruno Nery