Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: what is n1570? |
| Date | 2011-06-29 16:55 -0700 |
| Organization | None to speak of |
| Message-ID | <lnzkl06vml.fsf@nuthaus.mib.org> (permalink) |
| References | <5903d461-260f-4d81-a120-e0d787c3c0f1@z7g2000prh.googlegroups.com> |
pete <pete@pwilson.net> writes:
> (Might be a double post, sorry if so)
>
> In another forum I'm arguing against an outlandish claim: that
> modifying a variable marked as const in a C source file generates a
> run-time error because it is (as is claimed) undefined behavior.
>
> The other guy's reference is n1570, ( http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
> ) section 6.7.3.
>
> That section does indeed seem to support his argument. Horrifying!
>
> So I ask you, sisters and brothers, what IS this n1570? And does it
> have any force of law?
My best guess is that the "other guy" has misunderstood the meaning of
"undefined behavior". It's a common misunderstanding, but it's hardly
specific to n1570; it goes back at least to C89/C90 (and, though, I
haven't checked, I doubt that that particular wording has changed
significantly since C89/C90).
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"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 | Next — Previous in thread | Find similar | Unroll thread
what is n1570? pete <pete@pwilson.net> - 2011-06-29 08:24 -0700
Re: what is n1570? Noob <root@127.0.0.1> - 2011-06-29 18:08 +0200
Re: what is n1570? Shao Miller <sha0.miller@gmail.com> - 2011-06-29 12:29 -0400
Re: what is n1570? Keith Thompson <kst-u@mib.org> - 2011-06-29 10:26 -0700
Re: what is n1570? Seebs <usenet-nospam@seebs.net> - 2011-06-29 17:46 +0000
Re: what is n1570? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-06-29 14:37 -0600
Re: what is n1570? Seebs <usenet-nospam@seebs.net> - 2011-06-29 21:15 +0000
Re: what is n1570? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-06-29 20:39 -0600
Re: what is n1570? Seebs <usenet-nospam@seebs.net> - 2011-06-30 14:52 +0000
Re: what is n1570? pete <pete@pwilson.net> - 2011-07-01 12:43 -0700
Re: what is n1570? Lauri Alanko <la@iki.fi> - 2011-07-01 19:50 +0000
Re: what is n1570? Keith Thompson <kst-u@mib.org> - 2011-07-01 13:23 -0700
Re: what is n1570? "J. J. Farrell" <jjf@bcs.org.uk> - 2011-06-29 23:32 +0100
Re: what is n1570? Keith Thompson <kst-u@mib.org> - 2011-06-29 16:55 -0700
csiph-web