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: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2005 18:48:09 -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 #9 from pinskia at gcc dot gnu dot org 2005-12-21 18:48 -------
(In reply to comment #8)
> I don't know whether GCC supports such target (if yes, you've
> potentially found a bug in GCC's implementation of total pointer
> ordering as required by the C++ standard)
My point was more the fact this is used to see if there is a max pointer for an
array (which is at max 2GB long). Well the usage is just wrong as most likely
you get an passed the array which then turns out to be undefined by that
definition. If you end up with a 2GB on a 64bit target, it will work just
fine. But not on a 32bit target which is where this is used, even though it
should just use (char*)-1; there.
Also this macro is wrong for some 16bit targets, etc. Basicially what OOo/ICU
is doing is a mess and really should rethink this part of the code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25512