Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: lvalue types Date: Thu, 12 Apr 2018 17:40:28 -0700 Organization: None to speak of Lines: 33 Message-ID: References: <2b687d74-f559-43a9-9aec-8a1067467ce2@googlegroups.com> <5fe67088-8e80-478e-a622-02d16b64166a@googlegroups.com> <65e621e1-9bc2-4558-a36d-9712e792494f@googlegroups.com> <117929cb-d6aa-45bc-a5d4-8566bb8c6d58@googlegroups.com> <33a55bca-4174-4e74-9444-8f7f2014b1ad@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="c8c6e38e69bef66bbc77325509afe095"; logging-data="13865"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196/I4KLnxwzJcZcmf4Ygzk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:jr42kurfyg9ULI9nX9p03QNpSh4= sha1:Fsk6kBX0md5OnPkAXmgUTZwI4w0= Xref: csiph.com comp.lang.c:129118 supercat@casperkitty.com writes: > On Thursday, April 12, 2018 at 4:26:24 PM UTC-5, Keith Thompson wrote: >> > The notion that >> > such code should be considered unusable in "Standard C" because it uses an >> > lvalue of type "int" to access an object of type "struct foo" would be >> > absurd if one intends "Standard C" to be a useful language. >> >> Yes, that would be absurd, which is why (unless I've missed something) >> nobody here has made such a claim. > > Perhaps I misunderstood what you meant by > >> > I believe that the standard means what it actually says, even when what >> > it actually says doesn't mean what the committee intended it to mean. >> > When that is the case, I consider it a defect in the standard that needs >> > correcting, not a justification for twisting the meaning of the relevant >> > terms so that what it actually says ends up matching what it should have >> > said. That was James Kuyper, not me. In any case, I didn't interpret what he wrote the way you did, though I suppose I can see how you took it the way you did. My own opinion is that a defect in the standard doesn't require us to discard common sense. I wouldn't hesitate to rely on the behavior of `obj.m = 42;`, and I don't think James would either. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"