Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: absence of max Date: Thu, 01 Dec 2016 10:53:15 -0800 Organization: None to speak of Lines: 29 Message-ID: References: <0e1db67d-0ab8-4971-a319-8aa66a40b873@googlegroups.com> <436aadfe-20e5-4349-bdf4-9bac145b0d7e@googlegroups.com> <87oa0zi280.fsf@bsb.me.uk> <871sxvhw4i.fsf@bsb.me.uk> <87a8ch18kc.fsf@bsb.me.uk> <874m2o22jy.fsf@bsb.me.uk> <4894f89e-1b6a-4a7e-97b5-e12c9734da41@googlegroups.com> <8e947169-6c71-4977-b6fd-bb7a1185994b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="e9e90b81bc42428c034e25748a0d26e9"; logging-data="701"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WK87eIWoU77Tqd/QZ7MKR" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:TT4zCGwQq+OHMES/DuSBZ2qm4N8= sha1:wWzNHjb7YQXEizUeNmkiscQOobo= Xref: csiph.com comp.lang.c:97831 supercat@casperkitty.com writes: > On Thursday, December 1, 2016 at 3:14:24 AM UTC-6, David Brown wrote: >> Yes, if only C had a way to write something like: >> >> void foo(int array1[restrict], int array2[restrict], int start, int end) >> >> then the optimiser would be free to assume that array1 and array2 don't >> overlap! >> >> Oh wait, C /does/ have a way to write that. > > A search of C99 "restrict" revealed an example of that syntax, and a search > of N1570 finds the same example, but I couldn't find anyplace in either > standard that actually described its meaning. What am I missing? N1570 6.7.3p8 discusses it briefly. N1570 6.7.3.1 is the "Formal definition of restrict". Does your PDF viewer not have a search function? > Also, there's no reason such meaning should only be available to parameters > but I don't think that syntax would be allowable in any other context. -- 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"