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 libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From john.carter@tait.co.nz  2003-06-08 22:24 -------
> apart from the stylistic gripe, does the patch fix the problem?

That's sort of the point isn't it? Does it fix the problem? Don't know. It
certainly will quash the warning, but does it quash a valid warning as well?
Don't know. 

However if you work with properly align pointers all the way through, with the
warnings on, you have a fairly strong proof that it is correct (w.r.t. alignment)

The correct answer is to do as I said, work with (_Obj *)'s instead of (char *)
and the problem will go away.

The solution in the repository now has the virtue of being there, and I no
longer use sparc's anyway, so I'll not be coding it myself. When a 64 bit
machine lands on my desk in a year or three, I'll worry (intensely) about it
again...


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