PR 20644 bogus uninitialized warning on unused variable
Manuel López-Ibáñez
lopezibanez@gmail.com
Sun Aug 10 11:14:00 GMT 2008
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?
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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-pr20644.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080810/7bd31227/attachment.ksh>
More information about the Gcc-patches
mailing list