https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59314

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-07-14
      Known to fail|                            |12.0
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |wrong-code
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
> ./cc1plus  -quiet t.ii -std=c++03
t.ii: In function 'void foo()':
t.ii:5:5: warning: implicit dereference will not access object of type
'volatile int' in statement
    5 |     r;
      |     ^
> ./cc1plus  -quiet t.ii -std=c++11
t.ii: In function 'void foo()':
t.ii:5:5: warning: implicit dereference will not access object of type
'volatile int' in statement
    5 |     r;
      |     ^
> cat t.ii
void foo()
{
    volatile int i=0;
    volatile int& r = i;
    r;
}

Reply via email to