aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-07-19 10:27:58 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-07-19 10:27:58 +0000
commitd555b1c77dd2eaf14475a83df44f6c891b5e1d01 (patch)
treedfc9020e9a37f633dc174a838d204287f5e7b22e /gcc/cp/typeck.c
parentb1d5eee8c13a952f8c3f46f1abbe8da8c12040a8 (diff)
downloadgcc-d555b1c77dd2eaf14475a83df44f6c891b5e1d01.zip
gcc-d555b1c77dd2eaf14475a83df44f6c891b5e1d01.tar.gz
gcc-d555b1c77dd2eaf14475a83df44f6c891b5e1d01.tar.bz2
re PR c++/44969 ([C++0x] <type_traits> std::is_constructible broken for fundamental types.)
/cp 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/44969 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t parameter. * cp-tree.h: Adjust declaration. * init.c (perform_member_init): Adjust caller. * decl.c (grok_reference_init, cp_finish_decl): Likewise. * typeck2.c (store_init_value): Likewise. (build_functional_cast): Pass complain argument to build_x_compound_expr_from_list. /testsuite 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/44969 * g++.dg/template/sfinae23.C: New. From-SVN: r162303
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r--gcc/cp/typeck.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 12e7649..484d299 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -5502,14 +5502,16 @@ build_x_conditional_expr (tree ifexp, tree op1, tree op2,
that performs them all and returns the value of the last of them. */
tree
-build_x_compound_expr_from_list (tree list, expr_list_kind exp)
+build_x_compound_expr_from_list (tree list, expr_list_kind exp,
+ tsubst_flags_t complain)
{
tree expr = TREE_VALUE (list);
if (TREE_CHAIN (list))
{
- switch (exp)
- {
+ if (complain & tf_error)
+ switch (exp)
+ {
case ELK_INIT:
permerror (input_location, "expression list treated as compound "
"expression in initializer");
@@ -5524,11 +5526,11 @@ build_x_compound_expr_from_list (tree list, expr_list_kind exp)
break;
default:
gcc_unreachable ();
- }
+ }
for (list = TREE_CHAIN (list); list; list = TREE_CHAIN (list))
expr = build_x_compound_expr (expr, TREE_VALUE (list),
- tf_warning_or_error);
+ complain);
}
return expr;