This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/23369] [4.0/4.1 regression] build_range_check generates wrong code for funcptr comparison


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]