Re: Assignment of union containing const-qualifier member

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Typo in the sock_addr section.

Please read
"So typecasting between object types is well-defined, given that the"
as
"So typecasting between pointer types is well-defined, given that the"

> The std says:
> "A pointer to an object type may be converted to a pointer to a different
> object type. If the resulting pointer is not correctly aligned for the
> referenced type, the behavior is undefined. Otherwise, when converted
> back again, the result shall compare equal to the original pointer."
>
> So typecasting between object types is well-defined, given that the
> resulting pointer is indeed correctly aligned for the target type. The
> various sock_addr types all impose a common default alignment,
> because they all begin with a member of the same type.

-Amol



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux