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: Is this valid C? Date: Thu, 23 Feb 2017 12:54:22 -0800 Organization: None to speak of Lines: 19 Message-ID: References: <87shnab3c5.fsf@bsb.me.uk> <87wpclaoqs.fsf@bsb.me.uk> <4a1d176e-0c60-422e-9eb0-04574b2f32ef@googlegroups.com> <54b54bc1-1f0d-40d8-b87d-5a18e95bb0d0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="17193b87357f3199fd5654843cb49d05"; logging-data="12635"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7KeBDxpN4AUBKngEG7QCV" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:EzDWts2rIGdujqnLKC58r5zU1J4= sha1:XRrHL9odd35dSrXNYqnV3BgoJCQ= Xref: csiph.com comp.lang.c:104528 Ike Naar writes: > On 2017-02-23, Keith Thompson wrote: >> I think that the [] operator is defined in terms of the & and + >> operators > > Did you mean the * and + operators? Yes, I was sloppy, sorry. Given an array object arr, the expression arr[i] involves, among other things, the usual conversion of the array expression arr to a pointer expression. That conversion has undefined behavior if arr was defined with the "register" keyword. -- 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"