This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23369] [4.0/4.1 regression] build_range_check generates wrong code for funcptr comparison
- From: "randolph at tausq dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2005 15:18:43 -0000
- Subject: [Bug middle-end/23369] [4.0/4.1 regression] build_range_check generates wrong code for funcptr comparison
- References: <20050813025029.23369.tausq@debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From randolph at tausq dot org 2005-08-15 15:18 -------
Subject: Re: [4.0/4.1 regression] build_range_check
generates wrong code for funcptr comparison
>>1) gcc should not be canonicalizing constants casted as function pointers
>
> I think it has to. GCC has no way of knowing whether the constant is
> a "real" function pointer or not.
Doesn't this break __cffc completely? What if I really wanted to do "if
(fptr == (func_t)-2)" or "if (fptr == (func_t)5000)?
randolph
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23369