diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2009-03-27 05:52:52 -0700 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-03-27 05:52:52 -0700 |
commit | a5f805df5860bd185c77261deaa48049485bfa4e (patch) | |
tree | a838c5940ee7e4cdb7c09c0bf3ae71d1c2c5d538 /gcc/c-common.h | |
parent | 9fd1d8548908e5089281e45770e5c5533fd94424 (diff) | |
download | gcc-a5f805df5860bd185c77261deaa48049485bfa4e.zip gcc-a5f805df5860bd185c77261deaa48049485bfa4e.tar.gz gcc-a5f805df5860bd185c77261deaa48049485bfa4e.tar.bz2 |
re PR c++/35652 (offset warning should be given in the front-end)
gcc/
2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35652
* builtins.h (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.
gcc/cp/
2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35652
* typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
gcc/testsuite/
2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35652
* gcc.dg/pr35652.C: New.
* g++.dg/warn/pr35652.C: New.
* gcc.dg/format/plus-1.c: Adjust message.
From-SVN: r145102
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 475c333..6ba33c6 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -746,7 +746,7 @@ extern tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwis and, if so, perhaps change them both back to their original type. */ extern tree shorten_compare (tree *, tree *, tree *, enum tree_code *); -extern tree pointer_int_sum (enum tree_code, tree, tree); +extern tree pointer_int_sum (location_t, enum tree_code, tree, tree); /* Add qualifiers to a type, in the fashion for C. */ extern tree c_build_qualified_type (tree, int); |