Re: [PATCH] doc: volatile considered evil

David Rientjes
2007-05-09T20:26:10Z

On Wed, 9 May 2007, Alan Cox wrote:

> arch/foo almost always supports a single compiler too - gcc. We simply
> don't support anything else. We use gcc inlines and features extensively.
>

Ok, so your "acceptable use clause" of your addition should include that
fact. That the volatile type qualifier is legitimate when developing a
new architecture and the only implementation you support for compilation
of such text has a one-to-one correspondence between actual and abstract
machine semantics.

> [1] ANSI C says access to the padding fields of a struct is undefined.
> ANSI C also says that struct assignment is a memcpy. Therefore struct
> assignment in ANSI C is a violation of ANSI C...
>

Padding bytes are unspecified, not undefined. I doubt ANSI C says
padding bytes are undefined because then any implementation that pads
members of a struct object would not be strictly conforming.

David