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]

More on memcpy() and alignment


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 <thorpej@shagadelic.org>


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