This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/25512] [4.1/4.2 Regression] Overflow not handled in ptr arithmetic folding
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2005 17:28:27 -0000
- Subject: [Bug middle-end/25512] [4.1/4.2 Regression] Overflow not handled in ptr arithmetic folding
- References: <bug-25512-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from gdr at integrable-solutions dot net 2005-12-21 17:28 -------
Subject: Re: [4.1/4.2 Regression] Overflow not handled in ptr arithmetic
folding
"gdr at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| ------- Comment #4 from gdr at gcc dot gnu dot org 2005-12-21 17:21 -------
| (In reply to comment #3)
| > Invalid as of 6.5.6/8
| >
| I don't think that paragraph explains why this is an
| invalid PR.
More to the point: We need to be more precise about our mapping for
pointer type -> integer type
integer type -> pointer type
T* -> U*
This issue should not be resolved in isolation, piece meal looking
only at benchmark numbers. It is fine to precisely define the
mappings to make the code undefined, or have defined semantics.
Notice also that this relates to the practice
(T*)(-1)
which is wiedely used in C programs (including GCC!).
Finally, we don't have a policy that the opener of a PR has "more
rights to close it", nor should we. We should be closing PRs on
technical grounds.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25512