Re: style: structures

Martin Husemann <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
On Tue, Oct 08, 2024 at 10:06:39AM +0200, [email protected] wrote:
> Shouldn't an exception been mentionned concerning structures that may be
> derived from a base structure, so that the first member of the derived
> structures is a base structure, using the C standard guaranteed property
> that the address of the first member is the address of the structure,
> allowing to cast pointers in order to operate whether on the base
> structure or on the derived structure?

Not sure this needs an explicit exception in the style rules. It is a
technical necessarity and requires a comment when it is used.

Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.