Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Andy Walker <anw@cuboid.co.uk> |
|---|---|
| Newsgroups | comp.std.c |
| Subject | Re: 7.1.4p2 vs. Annex J |
| Date | 2020-08-05 10:47 +0100 |
| Organization | Not very much |
| Message-ID | <rgdv6n$tal$1@gioia.aioe.org> (permalink) |
| References | <87bljr84ay.fsf@nosuchdomain.example.com> |
On 04/08/2020 04:42, Keith Thompson wrote: > But J.2 (which is non-normative) says that the behavior is undefined if: > A function, object, type, or macro that is specified as being > declared or defined by some standard header is used before any > header that declares or defines it is included (7.1.2). This is a fine example of the ambiguity in English that makes writing standards therein fraught with difficulties. The structure is "UB if A before B". Keith reads that as forbidding "A" without "B", the same structure as "you can't go out before Saturday"; others read it as "A" being allowed by itself or following "B", but not if there is a later "B", the same structure as "you can't eat before swimming". So it's ambiguous. I used to use "while" to illustrate a similar ambiguity; the UK used to have a road sign "wait here while lights are red" in front of temporary signals for road works. But whereas most people read "while" as meaning "for as long as" [also the programming usage], in parts of the UK it means "until" ["wait here while the doctor comes"], which left locals [allegedly] waiting on the green light and driving through on red [even in Yorkshire, they're probably not that daft, though it might be an ingenious excuse following an accident]. This article is brought to you from the campaign for formal definitions of languages. [There has been a relevant thread over in "comp.lang.misc".] -- Andy Walker, Nottingham.
Back to comp.std.c | Previous | Next — Previous in thread | Find similar | Unroll thread
7.1.4p2 vs. Annex J Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-03 20:42 -0700
Re: 7.1.4p2 vs. Annex J Ike Naar <ike@otaku.sdf.org> - 2020-08-04 05:26 +0000
Re: 7.1.4p2 vs. Annex J Philipp Klaus Krause <pkk@spth.de> - 2020-08-04 10:53 +0200
Re: 7.1.4p2 vs. Annex J Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-04 07:29 -0700
Re: 7.1.4p2 vs. Annex J Andy Walker <anw@cuboid.co.uk> - 2020-08-05 10:47 +0100
csiph-web