Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc01!hpcuhb!hpcllla!hpcllca!walter From: walter@hpcllca.HP.COM (Walter Murray) Newsgroups: comp.std.c Subject: Re: the "const" qualifier Message-ID: <16490025@hpcllca.HP.COM> Date: 9 Aug 90 22:01:23 GMT References: <1990Aug1.005200.21645@ccu.umanitoba.ca> Organization: Hewlett Packard Calif. Language Lab Lines: 29 Larry Jones: >It seems to me that there used to be a statement in the standard that >said basically that if an aggregate is qualified, all of the members >are effectively qualified, and if a member of an aggregate is >qualified, then the aggregate is effectively qualified. Now I don't >seem to be able to find it. Am I imagining things again, did I miss >it, or did we remove it? Doug Gwyn: >Yeah, I was looking for that too, and I didn't find it either. >The only thing I found that was at all relevant said that a qualifier >in an array declaration actually qualifies the elements of the array, >not the array itself. However, that's not what we're looking for.. >I have no idea what might have happened to the part<->whole clause. If you access a member of a struct or union that has qualified type, using the . operator or the -> operator, the qualifiers of the struct or union apply to the member. Section 3.3.2.3. Going the other way, a struct or union can't be a modifiable lvalue if it has a member with a const-qualified type. Section 3.2.2.1. Taken with the semantics rules in 3.5.3, these seem to provide what we are looking for. Walter Murray ----------