Fix PR c++/70822 (bogus error with parenthesized SCOPE_REF)
authorPatrick Palka <ppalka@gcc.gnu.org>
Thu, 26 May 2016 18:17:43 +0000 (18:17 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Thu, 26 May 2016 18:17:43 +0000 (18:17 +0000)
commitcac177cfad2b48c29870caeb0af51d7cee645fae
tree85dbf7b03ad63dbe5b99de2ccdca79de0dbfd08d
parentc38c11a10aecab37d938dee5a22276e3304fdd53
Fix PR c++/70822 (bogus error with parenthesized SCOPE_REF)

gcc/cp/ChangeLog:

PR c++/70822
PR c++/70106
* cp-tree.h (REF_PARENTHESIZED_P): Make this flag apply to
SCOPE_REFs too.
* pt.c (tsubst_qualified_id): If REF_PARENTHESIZED_P is set
on the qualified_id then propagate it to the resulting
expression.
(do_auto_deduction): Check REF_PARENTHESIZED_P on SCOPE_REFs
too.
* semantics.c (force_paren_expr): If given a SCOPE_REF, just set
its REF_PARENTHESIZED_P flag.

gcc/testsuite/ChangeLog:

PR c++/70822
PR c++/70106
* g++.dg/cpp1y/auto-fn32.C: New test.
* g++.dg/cpp1y/paren4.C: New test.

From-SVN: r236792
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/auto-fn32.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/paren4.C [new file with mode: 0644]