GCC has the -Winit-self warning.

David

On Fri, Nov 9, 2012 at 12:18 PM, Bruno Nery <br...@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

Reply via email to