Question on strict aliasing in C.
Georg-Johann Lay
avr@gjlay.de
Mon Jul 4 18:53:00 GMT 2011
Paul Smith wrote:
> On Mon, 2011-07-04 at 19:17 +0200, Georg-Johann Lay wrote:
>>>> double copysign (double x, double y)
>>>> {
>>>> unsigned short * const px = (unsigned short*)(char*)&x + 3;
>>>> unsigned short * const py = (unsigned short*)(char*)&y + 3;
>
> I don't get why you have the (char*) cast here?
It's not a source of mine. I don't know the reason why it's there.
More information about the Gcc-help
mailing list