This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
- From: "john dot carter at tait dot co dot nz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2003 22:24:38 -0000
- Subject: [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
- References: <20021016151600.8246.john.carter@tait.co.nz>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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...