diff options
author | Patrick Palka <ppalka@gcc.gnu.org> | 2016-02-25 01:14:27 +0000 |
---|---|---|
committer | Patrick Palka <ppalka@gcc.gnu.org> | 2016-02-25 01:14:27 +0000 |
commit | 1137001cd9b3751964b44ab80861cf7a91aa197b (patch) | |
tree | f621bb008d6f17792de60637f9e2e5e36d9e9ead /gcc/cp/pt.c | |
parent | a8b233b7f204138b2629db2b818c807df4a1ef52 (diff) | |
download | gcc-1137001cd9b3751964b44ab80861cf7a91aa197b.zip gcc-1137001cd9b3751964b44ab80861cf7a91aa197b.tar.gz gcc-1137001cd9b3751964b44ab80861cf7a91aa197b.tar.bz2 |
re PR c++/69736 ("error: too few arguments to function" in c++14 but not c++11)
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.
From-SVN: r233691
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index e9cdf6e8..cd3eb67 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15961,6 +15961,10 @@ tsubst_copy_and_build (tree t, else r = build_x_indirect_ref (input_location, r, RO_UNARY_STAR, complain|decltype_flag); + + if (TREE_CODE (r) == INDIRECT_REF) + REF_PARENTHESIZED_P (r) = REF_PARENTHESIZED_P (t); + RETURN (r); } |