aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-04-24 13:58:11 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-04-24 13:58:11 +0000
commita378996bf6f7e4a8261129e9afce4b59983f5546 (patch)
treeab973de9cde7ee1d253e0b8c86d0ef0a5f1b5212 /gcc/cp/pt.c
parent07c2f65903ff83e0797ceaf627ac858f7ce74377 (diff)
downloadgcc-a378996bf6f7e4a8261129e9afce4b59983f5546.zip
gcc-a378996bf6f7e4a8261129e9afce4b59983f5546.tar.gz
gcc-a378996bf6f7e4a8261129e9afce4b59983f5546.tar.bz2
re PR c++/56970 (SFINAE does not apply correctly to sizeof.)
/cp 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> PR c++/56970 * init.c (build_offset_ref): Add tsubst_flags_t parameter. * semantics.c (finish_qualified_id_expr): Likewise. (finish_id_expression): Update. * typeck.c (cp_build_addr_expr_1): Likewise. * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise. * cp-tree.h: Update declarations. /testsuite 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> PR c++/56970 * g++.dg/cpp0x/sfinae45.C: New. From-SVN: r198232
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 855c1f7..7d169b76 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12053,7 +12053,7 @@ tsubst_qualified_id (tree qualified_id, tree args,
expr = (finish_qualified_id_expr
(scope, expr, done, address_p && PTRMEM_OK_P (qualified_id),
QUALIFIED_NAME_IS_TEMPLATE (qualified_id),
- /*template_arg_p=*/false));
+ /*template_arg_p=*/false, complain));
}
/* Expressions do not generally have reference type. */
@@ -16040,7 +16040,7 @@ resolve_nondeduced_context (tree orig_expr)
{
tree base
= TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (offset, 0)));
- expr = build_offset_ref (base, expr, addr);
+ expr = build_offset_ref (base, expr, addr, tf_warning_or_error);
}
if (addr)
expr = cp_build_addr_expr (expr, tf_warning_or_error);