------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-10 
01:30 -------
You should get a warning with -Wuninitialized at -O1 and above.
In fact I do get one for the following code:
int f(void)
{
  int *p;
  int &r = *p;
  return r;
}

---
4.0.0 and above's output:
t.cc: In function 'int f()':
t.cc:4: warning: 'p' is used uninitialized in this function

before 3.3's output:
t.cc: In function `int f()':
t.cc:3: warning: `int*p' might be used uninitialized in this function


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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

Reply via email to