This is the mail archive of the
mailing list for the GCC project.
More on memcpy() and alignment
- To: gcc-bugs at gcc dot gnu dot org
- Subject: More on memcpy() and alignment
- From: Jason Thorpe <thorpej at shagadelic dot org>
- Date: Sun, 05 Mar 2000 17:18:39 -0800
More on this...
I was just informed that the DEC C compiler will change its behavior
if the arguments are casted ... e.g. if an argument was casted to char *,
it would not assume that argument was aligned.
GCC does not do this. In fact, the original code in the BSD IP code which
caused me to look at this in the first place already casted the argument to
a caddr_t (which is typedef'd "char *").
So, my question now is should GCC change its behavior if the argument is
casted, like the DEC compiler does?
-- Jason R. Thorpe <firstname.lastname@example.org>