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 c++/15837] Optimization (of templatized functions?)


------- Additional Comments From adruab at voria dot com  2004-06-06 06:38 -------
Hmmmmm, ok, so I changed a bunch of the functions to use p = (pointer)((char*)p
+ stride); and it seems to have fixed the mis-optimization.  (it could just be
because the current function has to recurse another level, but I'm willing to
bet that it just doesn't get confused).

So my question now is why does gcc even allow the cast to (char*&)?  If it will
get so confused shouldn't it tell me?

It's worth noting that the & part of the cast was a quick fix to get around
compiler errors that I was getting about aliasing... it seemed to work at the
time :P.

So I'll certainly keep that in mind when I'm designing future stuff (I didn't
write this really in the first place... so you know :P).

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15837


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