diff options
author | Ben Elliston <bje@au.ibm.com> | 2009-04-28 04:56:47 +0000 |
---|---|---|
committer | Ben Elliston <bje@gcc.gnu.org> | 2009-04-28 14:56:47 +1000 |
commit | b2ed71b61a5f8a7d8c001516af6997d3fcaff403 (patch) | |
tree | a7b2e8cf678fd319d296b231776140e3a5a093d0 /gcc/cp/typeck.c | |
parent | 903db43579c8059fb643086c5492e7c58f702bfe (diff) | |
download | gcc-b2ed71b61a5f8a7d8c001516af6997d3fcaff403.zip gcc-b2ed71b61a5f8a7d8c001516af6997d3fcaff403.tar.gz gcc-b2ed71b61a5f8a7d8c001516af6997d3fcaff403.tar.bz2 |
revert: re PR c++/35652 (offset warning should be given in the front-end)
Revert:
PR c++/35652
2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
gcc/
* builtins.c (c_strlen): Do not warn here.
* c-typeck.c (build_binary_op): Adjust calls to pointer_int_sum.
* c-common.c (pointer_int_sum): Take an explicit location.
Warn about offsets out of bounds.
* c-common.h (pointer_int_sum): Adjust declaration.
cp/
* typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
testsuite/
* gcc.dg/pr35652.C: New.
* g++.dg/warn/pr35652.C: New.
* gcc.dg/format/plus-1.c: Adjust message.
From-SVN: r146870
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r-- | gcc/cp/typeck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 69d5529..5486c54 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4054,7 +4054,7 @@ cp_pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop) pointer_int_sum() anyway. */ complete_type (TREE_TYPE (res_type)); - return pointer_int_sum (input_location, resultcode, ptrop, + return pointer_int_sum (resultcode, ptrop, fold_if_not_in_template (intop)); } |