PR 20644 bogus uninitialized warning on unused variable
Richard Guenther
richard.guenther@gmail.com
Sun Aug 10 18:08:00 GMT 2008
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.
>
More information about the Gcc-patches
mailing list