------- Comment #1 from rguenth at gcc dot gnu dot org  2009-02-02 14:03 -------
We could for example warn for

/* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */

int i;
int __attribute((const,noinline))
foo (int **p)
{
  return i;
}
int bar(int *q)
{
  int *p;
  *q = 0;
  int j = foo(&p);
  return *p + j;  /* { dg-warning "dereferencing uninitialized" } */
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-02-02 14:03:04
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39074

Reply via email to