Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: How is type **********p implemented? Message-ID: <1991Jun26.171127.8647@zoo.toronto.edu> Date: Wed, 26 Jun 1991 17:11:27 GMT References: <2623@gold.gvg.tek.com> Organization: U of Toronto Zoology In article <2623@gold.gvg.tek.com> shaunc@gold.gvg.tek.com (Shaun Case) writes: >How do C compiler writers implement items like int ***************p, for >which the target processor has insufficient levels of hardware indirection? The obvious way, actually. Most modern processors (anything that ends in "86" is not modern :-)) have only one level of indirection in their addressing system. So if the user declares something like your `p' and then does `x = ***************p;', the code is the equivalent of: tmp1 = *p; tmp2 = *tmp1; tmp3 = *tmp2; ... x = *tmpn; In practice, usually all the tmp* will share a single register unless the hardware has strange ideas about data types. -- "We're thinking about upgrading from | Henry Spencer @ U of Toronto Zoology SunOS 4.1.1 to SunOS 3.5." | henry@zoo.toronto.edu utzoo!henry