Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #129364

Re: lvalue types

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: lvalue types
Date Tue, 17 Apr 2018 14:13:32 -0700
Organization None to speak of
Lines 65
Message-ID <lnin8pleo3.fsf@kst-u.example.com> (permalink)
References <2b687d74-f559-43a9-9aec-8a1067467ce2@googlegroups.com> <65e621e1-9bc2-4558-a36d-9712e792494f@googlegroups.com> <kfnvacxbo6r.fsf@x-alumni2.alumni.caltech.edu> <117929cb-d6aa-45bc-a5d4-8566bb8c6d58@googlegroups.com> <33a55bca-4174-4e74-9444-8f7f2014b1ad@googlegroups.com> <390abe70-908f-4f19-b6f8-84ec38d3ea90@googlegroups.com> <64746e6c-0c23-47a6-a5d4-d15a33db4aed@googlegroups.com> <a4ad0855-8098-4bb3-b499-ca1ca457df99@googlegroups.com> <83589df8-fa61-4ffb-8fef-09ab50c8fcf4@googlegroups.com> <b9ba615a-a637-4c93-bd44-3f42d2578b2c@googlegroups.com> <646ca446-53a3-4006-a476-6f52caacd8c9@googlegroups.com> <uqcBC.238$o43.209@fx33.iad> <c2d54052-e0c6-4eef-b7c6-ff9839664bc7@googlegroups.com> <lnzi21ltpy.fsf@kst-u.example.com> <108b8472-481e-43b4-9988-2c7e4648449d@googlegroups.com> <lnvacplooa.fsf@kst-u.example.com> <2bf95ece-0d26-49aa-8629-87d9c47ef2ad@googlegroups.com> <lnmuy1lldy.fsf@kst-u.example.com> <97b9de3e-f3f8-45c1-8850-a29ca57069d5@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info reader02.eternal-september.org; posting-host="dcaeb3e1ef05ac06fdd3cc3805c02cf2"; logging-data="7607"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18P2Owoswnt167na/X0GneM"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock sha1:KzQthyYDDCHOdVa6GegKeGgA+GU= sha1:fpDpV88purx8v0ki2BYOlbYS8xQ=
Xref csiph.com comp.lang.c:129364

Show key headers only | View raw


supercat@casperkitty.com writes:
> On Tuesday, April 17, 2018 at 1:48:34 PM UTC-5, Keith Thompson wrote:
>> supercat@casperkitty.com writes:
>> > On Tuesday, April 17, 2018 at 12:37:34 PM UTC-5, Keith Thompson wrote:
>> >> Or you could just say that the standard as currently written says
>> >> the behavior is undefined (because it violates a "shall" outside
>> >> a constraint), and save us all a lot of time.
>> >> 
>> >> I fail to see the point of going off on a tangent about categories of
>> >> "portable" programs.
>> >
>> > Many people claim there's no particular need to have the Standard define
>> > certain things because implementations can do so whether or not the
>> > Standard does.  If the Standard is supposed to facilitate the writing of
>> > portable programs, having the standard needlessly characterize common
>> > constructs as "non-portable" undercuts that goal.
>> 
>> That's not what we're talking about here.
>> 
>> Nobody is saying that there's no need for the standard to define the
>> behavior of `obj.m = 42;`.  Either the standard *unintentionally* fails
>> to define the behavior and that's a flaw that needs to be corrected, or
>> the standard does define it.
>> 
>> "It's ok not to define the behavior of `obj.m = 42;`" is not
>> something that anyone has claimed explicitly or implicitly.
>> 
>> If that's the claim you're arguing against, you win.
>
> It was apparent even in 1992 that the Standard failed to adequately specify
> the cases where a union object may be accessed using a pointer to a member.
> Had it done so, the answer to DR028 would have been obvious.
>
> Between 1992 and 1999, the lack of clarity might have been reasonably
> regarded as an oversight.  Do you think the failure to address the issue
> in not just one but two subsequent revisions of the Standard continues to
> be a result of mere oversight?

Yes, I do.

It took three tries for the standard to come up with a consistent
definition of "lvalue" (compare the definitions in C90, C99,
and C11), and the standard still doesn't tell us what the value
of a string literal is or state that a parenthesized null pointer
constant is a null pointer constant.  Yes, I can believe that this
is a mere oversight.  (And we're talking about accessing a member
of a structure, not of a union.)

I don't say this to criticize the members of the committee.
Defining a language in an English document is hard, and a few
glitches are inevitable.

Now, without answering with more questions, can you tell us what
*you* think?  Do you believe that the intended behavior of
`obj.m = 42;` (where obj is a struct object and m is a member of
type int) is anything other than obvious?  If you agree with me
that the standard currently fails to define that behavior, do you
believe that to be deliberate?  If so, why do you believe that,
and why would they do it?

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
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"

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

lvalue types supercat@casperkitty.com - 2018-03-01 16:38 -0800
  Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 17:17 -0800
  Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-01 17:37 -0800
    Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 22:00 -0800
    Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 23:49 -0800
      Re: lvalue types asetofsymbols@gmail.com - 2018-03-05 06:56 -0800
    Re: lvalue types supercat@casperkitty.com - 2018-03-02 00:22 -0800
      Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-02 01:23 -0800
      Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-02 05:04 -0800
        Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-02 06:06 -0800
          Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-02 08:12 -0800
      Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-02 09:50 -0800
        Re: lvalue types supercat@casperkitty.com - 2018-03-02 11:33 -0800
          Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-02 11:45 -0800
            Re: lvalue types supercat@casperkitty.com - 2018-03-02 16:28 -0800
              Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-02 16:54 -0800
                Re: lvalue types supercat@casperkitty.com - 2018-03-02 17:50 -0800
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-02 19:43 -0800
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-02 22:51 -0800
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-02 23:07 -0800
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-03 01:44 -0800
                Re: lvalue types supercat@casperkitty.com - 2018-03-03 13:01 -0800
          Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-02 22:21 -0800
    Re: lvalue types supercat@casperkitty.com - 2018-03-02 09:24 -0800
    Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-03 00:58 -0800
      Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-03 01:13 -0800
      Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-03 13:01 -0800
        Re: lvalue types supercat <flatfinger@casperkitty.com> - 2018-03-03 17:43 -0800
        Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-04 02:22 -0800
          Re: lvalue types supercat@casperkitty.com - 2018-03-04 13:03 -0800
          Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-04 13:03 -0800
            Re: lvalue types bartc <bc@freeuk.com> - 2018-03-04 22:32 +0000
            Re: lvalue types supercat@casperkitty.com - 2018-03-05 09:45 -0800
            Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-19 09:54 -0700
              Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-19 11:52 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-26 23:44 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-27 09:14 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-03-27 12:21 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-28 17:01 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-29 01:54 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-30 08:32 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-30 09:25 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-03-30 10:58 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-31 00:52 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-02 15:19 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-03 10:06 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-03 11:33 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-03 12:19 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-03 12:48 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-05 10:17 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-05 10:52 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-05 12:39 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-06 06:13 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-04 16:38 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-03-27 12:09 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-28 10:48 -0700
              Re: lvalue types supercat@casperkitty.com - 2018-03-19 12:27 -0700
          Re: lvalue types jameskuyper@verizon.net - 2018-04-03 14:02 -0700
            Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-04 17:32 -0700
              Re: lvalue types jameskuyper@verizon.net - 2018-04-04 20:24 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-09 08:31 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-11 11:19 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-11 12:44 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-12 06:45 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-12 07:54 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-12 14:26 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-12 14:43 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-12 17:40 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-13 03:02 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-13 00:27 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-13 07:19 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-16 08:52 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-16 10:28 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-16 13:58 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-16 14:52 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-16 16:22 -0700
                Re: lvalue types Richard Damon <Richard@Damon-Family.org> - 2018-04-16 21:51 -0400
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-16 19:42 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-16 21:30 -0700
                Re: lvalue types Richard Damon <Richard@Damon-Family.org> - 2018-04-17 07:01 -0400
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-17 04:22 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-19 02:43 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-17 07:25 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-17 08:48 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-17 09:54 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-17 10:37 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-17 11:00 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-17 11:48 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-17 12:45 -0700
                Re: lvalue types scott@slp53.sl.home (Scott Lurndal) - 2018-04-17 19:55 +0000
                Re: lvalue types jameskuyper@verizon.net - 2018-04-17 13:13 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-17 14:00 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-17 19:45 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 08:27 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-18 09:12 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 10:13 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-18 11:01 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-18 11:51 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 12:15 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-18 12:30 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 13:25 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-19 10:51 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-18 12:38 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 14:39 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-18 21:17 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-19 02:40 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-19 03:01 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-19 06:49 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-19 07:58 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-20 08:19 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-19 12:17 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-19 12:51 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-19 13:37 -0700
                Re: lvalue types scott@slp53.sl.home (Scott Lurndal) - 2018-04-19 21:08 +0000
                Re: lvalue types supercat@casperkitty.com - 2018-04-19 14:50 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-19 14:56 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-19 16:13 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-21 10:27 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-23 11:37 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-18 16:07 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-18 09:20 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 11:25 -0700
                Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-04-17 14:13 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-17 15:05 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-17 19:57 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 08:43 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-18 09:36 -0700
                Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-17 11:37 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-17 20:23 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 09:23 -0700
                Re: lvalue types scott@slp53.sl.home (Scott Lurndal) - 2018-04-18 17:29 +0000
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 10:47 -0700
                Re: lvalue types bartc <bc@freeuk.com> - 2018-04-18 20:04 +0100
                Re: lvalue types jameskuyper@verizon.net - 2018-04-18 10:48 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 13:23 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-18 14:26 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-18 15:36 -0700
                Re: lvalue types jameskuyper@verizon.net - 2018-04-19 10:39 -0700
                Re: lvalue types supercat@casperkitty.com - 2018-04-19 12:42 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-16 21:29 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-04-23 11:39 -0700
                Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-06-14 02:53 -0700
              Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-04 21:30 -0700
      Re: lvalue types supercat@casperkitty.com - 2018-03-03 14:19 -0800
  Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 18:03 -0800
  Re: lvalue types John Bode <jfbode1029@gmail.com> - 2018-03-21 10:33 -0700
    Re: lvalue types Keith Thompson <kst-u@mib.org> - 2018-03-21 11:53 -0700
      Re: lvalue types Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-22 00:11 -0700
    Re: lvalue types supercat@casperkitty.com - 2018-03-21 11:53 -0700
    Re: lvalue types Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-26 23:04 -0700

csiph-web