This is the mail archive of the gcc-patches@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]

Re: PR 20644 bogus uninitialized warning on unused variable


On Sun, Aug 10, 2008 at 11:14 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> The issue is that we warn too early about things that we are not sure
> about. The fix is to delay the "may be" warnings to the late pass.
> However, if no optimization is given we have to give all warnings in
> the early pass.
>
> Bootstrapped and regression tested on x86_64-unknown-linux-gnu with
> --enable-languages=all,ada
>
> OK for trunk?

Ok.

Thanks,
Richard.

> 2008-08-10  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
>
>        PR middle-end/20644
>        * tree-ssa.c (struct walk_data): Add new flag
>        warn_possibly_uninitialized.
>        (warn_uninitialized_var): Use it.
>        (warn_uninitialized_vars): New.
>        (execute_early_warn_uninitialized): Call it.
>        (execute_late_warn_uninitialized): Likewise.
> testsuite/
>        * gcc.dg/uninit-pr20644-O0.c: New.
>        * gcc.dg/uninit-pr20644.c: New.
>


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