diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-08-05 22:03:52 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-08-05 22:03:52 +0000 |
commit | fd9b0f320e88e8d71831b62867627295b77d26b6 (patch) | |
tree | 972828ab28f5fc63eb5a27940150211bbef325be /gcc/cp | |
parent | 8ac69a6c3230bd774a6f59f37b864a4bcee81c7c (diff) | |
download | gcc-fd9b0f320e88e8d71831b62867627295b77d26b6.zip gcc-fd9b0f320e88e8d71831b62867627295b77d26b6.tar.gz gcc-fd9b0f320e88e8d71831b62867627295b77d26b6.tar.bz2 |
re PR c++/58080 (internal compiler error, decltype in function declaration (for SFINAE purposes))
/c-family
2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58080
* c-common.c (pointer_int_sum): Add bool parameter.
* c-common.h (pointer_int_sum): Adjust declaration.
/cp
2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58080
* typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
(cp_build_binary_op): Adjust.
/testsuite
2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58080
* g++.dg/cpp0x/pr58080.C: New.
From-SVN: r201512
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a52cbc9..f85fd3f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-08-05 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58080 + * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter. + (cp_build_binary_op): Adjust. + 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net> * cxx-pretty-print.h (pp_c_base): Remove. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 6f33055..e09c325 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -43,7 +43,7 @@ static tree pfn_from_ptrmemfunc (tree); static tree delta_from_ptrmemfunc (tree); static tree convert_for_assignment (tree, tree, impl_conv_rhs, tree, int, tsubst_flags_t, int); -static tree cp_pointer_int_sum (enum tree_code, tree, tree); +static tree cp_pointer_int_sum (enum tree_code, tree, tree, tsubst_flags_t); static tree rationalize_conditional_expr (enum tree_code, tree, tsubst_flags_t); static int comp_ptr_ttypes_real (tree, tree, int); @@ -4064,7 +4064,8 @@ cp_build_binary_op (location_t location, } return cp_pointer_int_sum (code, ptr_operand, - int_operand); + int_operand, + complain); } common = 1; break; @@ -4894,7 +4895,8 @@ build_x_vec_perm_expr (location_t loc, of pointer PTROP and integer INTOP. */ static tree -cp_pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop) +cp_pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop, + tsubst_flags_t complain) { tree res_type = TREE_TYPE (ptrop); @@ -4906,7 +4908,8 @@ cp_pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop) complete_type (TREE_TYPE (res_type)); return pointer_int_sum (input_location, resultcode, ptrop, - fold_if_not_in_template (intop)); + fold_if_not_in_template (intop), + complain & tf_warning_or_error); } /* Return a tree for the difference of pointers OP0 and OP1. |