re PR middle-end/59223 (-Wmaybe-uninitialized and -Wuninitialized relationships)
PR middle-end/59223 * tree-ssa-uninit.c (gate_warn_uninitialized): Run the pass even for -Wmaybe-uninitialized. testsuite/ * c-c++-common/pr59223.c: New test. From-SVN: r208196
This commit is contained in:
parent
6f45986acc
commit
bb0d8e8488
|
@ -1,3 +1,9 @@
|
|||
2014-02-27 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR middle-end/59223
|
||||
* tree-ssa-uninit.c (gate_warn_uninitialized): Run the pass even for
|
||||
-Wmaybe-uninitialized.
|
||||
|
||||
2014-02-27 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR target/57936
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2014-02-27 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR middle-end/59223
|
||||
* c-c++-common/pr59223.c: New test.
|
||||
|
||||
2014-02-26 Ilya Tocar <ilya.tocar@intel.com>
|
||||
|
||||
* common/config/i386/predicates.md (const1256_operand): Remove.
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* PR c/59223 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -Wmaybe-uninitialized" } */
|
||||
|
||||
int foo (int x)
|
||||
{
|
||||
int y;
|
||||
if (x == 0)
|
||||
y = 1;
|
||||
else if (x == 1)
|
||||
y = 2;
|
||||
return y; /* { dg-warning "may be used uninitialized in this function" } */
|
||||
}
|
|
@ -2355,7 +2355,7 @@ execute_late_warn_uninitialized (void)
|
|||
static bool
|
||||
gate_warn_uninitialized (void)
|
||||
{
|
||||
return warn_uninitialized != 0;
|
||||
return warn_uninitialized || warn_maybe_uninitialized;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
Loading…
Reference in New Issue