This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable
- From: "pinskia at earth dot geop dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2006 21:52:25 -0000
- Subject: [Bug middle-end/29574] Gcc gives invalid warning about unitialized variable
- References: <bug-29574-13450@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from pinskia at earth dot geop dot uc dot edu 2006-10-23 21:52 -------
Subject: Re: Gcc gives invalid warning about unitialized variable
>
>
>
> ------- Comment #8 from mbligh at mbligh dot org 2006-10-23 21:50 -------
> > Initialize the variable and forget about inefficiency. Again this is fixed for
> > 4.2.0, the warning is only because __builtin_expect gets in the way of figuring
> > out if the variable is used uninitialized, nothing more.
>
> I understand the __builtin_expect case is fixed in 4.2, and am fine with that,
> but I was talking about the ones that aren't inlined, and don't use
> builtin_expect. Does gcc 4.2 walk through functions as well, or will it always
> produce an invalid warning there?
No, for ones which are not inlined, GCC does not look through other functions
to
check for the warning.
Thanks,
Andrew Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29574