This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
RE: fix for compilations with gcc 4.7
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Sat, 09 Jul 2011 02:10:49 -0700
- Subject: RE: fix for compilations with gcc 4.7
> > > Byte by byte storing of the word is possible, but to me it looks more
> > complicated than needed with endianness handling.
> >
> > There is only one correct endianness for each format.
>
> Btw after the endianness is handled memcopy also can be used instead of
> byte-by-byte copy. What do you prefer ?
There is no need or use for memcpy. You have to do byte-by-byte encoding
(of four bytes, twice) to directly specify the endianness anyway, and then
you've done the whole thing in place already.