Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | BartC <bc@freeuk.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Question |
| Date | 2016-07-28 20:57 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <nndo31$goe$1@dont-email.me> (permalink) |
| References | <nnd8ue$nnp$2@dont-email.me> <nndd2r$7lg$1@dont-email.me> <ln7fc58u92.fsf@kst-u.example.com> |
On 28/07/2016 19:58, Keith Thompson wrote: > BartC <bc@freeuk.com> writes: >>> (*(imageType**)&(image)->clientData[0])=(src) >> >> It depends on whether the & applies to just (image) or to the -> part >> too (I don't know off-hand). > > You could easily find out before posting. It doesn't matter. I go on to assume that & is applied to everything up to the = as everything then fits into place. But & followed by a sprawling term like that, and with extraneous parentheses (which looks like some of my machine-generated code), I would write more clearly like this, even if the precedences render that unnecessary: &(image->clientData[0]) (A unary prefix op like that in front of a binary infix operation and having lower precedence is unusual, if "->" is thought of as a binary operator. So another reason to treat it as more special.) >> (Note than imageType is a struct tag name rather than a type name, so I >> guess this is not the exact code.) > > Perhaps -- or perhaps the code was compiled as C++, and the OP > mistakenly assumed it was C. Or maybe there *is* a typedef 'imageType' which is not shown. (This is a strike against having a separate namespace for struct tags as then there would be less doubt.) -- Bartc
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Question DFS <nospam@dfs.com> - 2016-07-28 11:38 -0400
Re: Question Melzzzzz <mel@zzzzz.com> - 2016-07-28 17:50 +0200
Re: Question BartC <bc@freeuk.com> - 2016-07-28 17:49 +0100
Re: Question Melzzzzz <mel@zzzzz.com> - 2016-07-28 18:52 +0200
Re: Question Keith Thompson <kst-u@mib.org> - 2016-07-28 11:58 -0700
Re: Question BartC <bc@freeuk.com> - 2016-07-28 20:57 +0100
Re: Question "D. Aaron Sawyer" <aaron@110.net> - 2016-07-28 13:55 -0300
Re: Question Barry Schwarz <schwarzb@dqel.com> - 2016-07-28 11:38 -0700
Re: Question DFS <nospam@dfs.com> - 2016-07-28 15:20 -0400
Re: Question Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-30 09:24 -0700
Re: Question Ian Collins <ian-news@hotmail.com> - 2016-07-29 07:23 +1200
Re: Question James Kuyper <jameskuyper@verizon.net> - 2016-07-28 16:05 -0400
Re: Question DFS <nospam@dfs.com> - 2016-07-29 10:14 -0400
Re: Question "James R. Kuyper" <jameskuyper@verizon.net> - 2016-07-30 14:45 -0400
Re: Question supercat@casperkitty.com - 2016-08-01 05:19 -0700
Re: Question Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-30 09:17 -0700
csiph-web