Fix PR c++/69736
authorppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Feb 2016 01:14:27 +0000 (01:14 +0000)
committerppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Feb 2016 01:14:27 +0000 (01:14 +0000)
commit4003c807e0b9be55b985740c2c1a03eb8d0ac44c
treef621bb008d6f17792de60637f9e2e5e36d9e9ead
parent38f18b3ce11981490431adaf063333c1a6137e52
Fix PR c++/69736

gcc/cp/ChangeLog:

PR c++/69736
* cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
(maybe_undo_parenthesized_ref): Declare.
* semantics.c (maybe_undo_parenthesized_ref): Split out from
check_return_expr.
(finish_call_expr): Use it.
* typeck.c (check_return_expr): Use it.
* pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
REF_PARENTHESIZED_P flag.

gcc/testsuite/ChangeLog:

PR c++/69736
* g++.dg/cpp1y/paren2.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233691 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/paren2.C [new file with mode: 0644]