Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sun, 22 Jan 2017 02:27:23 -0600 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Access structure members via pointer to an array of structures References: Date: Sun, 22 Jan 2017 08:27:23 +0000 Message-ID: <87pojf5wk4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:bRQsIVv64rY59Up4lk8+4l021zQ= MIME-Version: 1.0 Content-Type: text/plain Lines: 18 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-hdsDdPLQ+Rc7qLFPcBEfwu3F4/jRB5MGF9ywke/H0dGyqVUwOFG1eIiRWTLmJZpPGaoHqIWr9Shyuho!OA5eRjYPAffoX2XfD2sW4elQhrlEZMt4hbIen1d6plzKhQ+47kEMx5ysYdsGSWWk2HAlEzA= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1561 Xref: csiph.com comp.lang.c:102308 Keith Thompson writes: > Why would you tell someone trying to learn C about "array pointer > equivalence"? Arrays and pointers are not equivalent. They are occasionally f(char *ptr){ printf("%s - %u\n",ptr,(unsigned)sizeof(ptr)); } f(char arr[10]){ printf("%s - %u\n",arr,(unsigned)sizeof(arr)); } Worst design decision in C. Understandable in context, but *ugh*. Also, seems to have caused BartC to go certifiably insane.