re PR c++/63203 (Self-initialization of reference not diagnosed if it occurs within...
authorJonathan Wakely <jwakely@redhat.com>
Mon, 24 Nov 2014 13:35:08 +0000 (13:35 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 24 Nov 2014 13:35:08 +0000 (13:35 +0000)
commit8be2ce257e49c440df49313116f59b805cc97259
treebd9653f692b6298911e2f6dd5ac0385951218b7b
parentf9b1eec21582f7801a8ca57463080331db95f2fb
re PR c++/63203 (Self-initialization of reference not diagnosed if it occurs within a loop)

/cp
2014-11-24  Jonathan Wakely  <jwakely@redhat.com>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/63203
* decl.c (initialize_local_var): Add -Winit-self warning for
references initialized with themselves.

/testsuite
2014-11-24  Jonathan Wakely  <jwakely@redhat.com>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/63203
* g++.dg/warn/Winit-self-2.C: New.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r218017
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Winit-self-2.C [new file with mode: 0644]