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:22 -------
Ok, I understand that.  However, if it is undefined why does gcc not give an
error? (sorry I missed your last post as I was adding the attachment).

Also, the pen class was originally designed by someone else in such a way to
allow it to work with non standard compiler packing structures (although that
was not accomplished as you'd also need a byte stride for the x dimension to do
that effectively).  I.E. you could refer to a member of a struct which was
defined to align on a 2 byte boundary and still be able to jump from one element
to the other.  Perhaps this is an unnecessary feature, and I suppose it could be
modified to work on a strict element basis rather than byte alignment.  However,
Is any way to accomplish this besides the method used?

The only thing I can think of to satisfy this constraint is to be more explicit
(i.e. rather than ((char *&)p)+= stride; do p = (value_type*)((char*)p +
stride); ).  Would that not work as well?  I'll try that and see....

Thanks for the help though.  Please excuse me if I seem a bit irritable, this is
the weirdest thing I have ever run into :).

-- 


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]