volatiles/consts inside structs in dpANS C

Karl Heuer karl at haddock.ISC.COM
Tue Mar 15 09:06:00 AEST 1988


In article <1988Mar13.005411.12592 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>... So assigning to [an entire] struct with a const member is illegal.
>Personally, I think such "buried qualifiers" should simply be illegal, since
>they are useless...

Doesn't sound useless to me.  `struct {int; int const;}` has properties
different from either `struct {int; int}` or `struct {int; int} const`: it
gives you a struct in which one member is modifiable and the other is not.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list