* Re: [9fans] pls. HELP porting problem
@ 2005-04-29 10:53 Aharon Robbins
2005-04-29 11:59 ` Bruce Ellis
2005-04-29 12:31 ` Brantley Coile
0 siblings, 2 replies; 11+ messages in thread
From: Aharon Robbins @ 2005-04-29 10:53 UTC (permalink / raw)
To: 9fans
> in a similar way, one has been able to write
> p->f(args)
> rather than
> (*p->f)(args)
> for quite some time.
I think this actually worked in the V7 C compiler and PCC, no?
> perhaps it's not in the standard!
It is. I think maybe even since 1989.
Arnold
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] pls. HELP porting problem
2005-04-29 10:53 [9fans] pls. HELP porting problem Aharon Robbins
@ 2005-04-29 11:59 ` Bruce Ellis
2005-04-29 15:15 ` rog
[not found] ` <6ea05dc57c13d1df7359ec63990a0f8b@vitanuova.com>
2005-04-29 12:31 ` Brantley Coile
1 sibling, 2 replies; 11+ messages in thread
From: Bruce Ellis @ 2005-04-29 11:59 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
PCC had a particularly aggressive disregard for indirections
in such cases. if 'f' was a pointer to a function then ...
f();
(*f)();
(***************************f)();
produced the same code and no diagnostics.
brucee
On 4/29/05, Aharon Robbins <arnold@skeeve.com> wrote:
> > in a similar way, one has been able to write
> > p->f(args)
> > rather than
> > (*p->f)(args)
> > for quite some time.
>
> I think this actually worked in the V7 C compiler and PCC, no?
>
> > perhaps it's not in the standard!
>
> It is. I think maybe even since 1989.
>
> Arnold
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] pls. HELP porting problem
2005-04-29 11:59 ` Bruce Ellis
@ 2005-04-29 15:15 ` rog
[not found] ` <6ea05dc57c13d1df7359ec63990a0f8b@vitanuova.com>
1 sibling, 0 replies; 11+ messages in thread
From: rog @ 2005-04-29 15:15 UTC (permalink / raw)
To: bruce.ellis, 9fans
> PCC had a particularly aggressive disregard for indirections
> in such cases. if 'f' was a pointer to a function then ...
>
> f();
> (*f)();
> (***************************f)();
surely this is inevitable if f ≡ &f ?
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <6ea05dc57c13d1df7359ec63990a0f8b@vitanuova.com>]
* Re: [9fans] pls. HELP porting problem
[not found] ` <6ea05dc57c13d1df7359ec63990a0f8b@vitanuova.com>
@ 2005-04-29 15:25 ` Bruce Ellis
2005-04-29 15:38 ` C H Forsyth
0 siblings, 1 reply; 11+ messages in thread
From: Bruce Ellis @ 2005-04-29 15:25 UTC (permalink / raw)
To: rog; +Cc: 9fans
i would never have thought to put in a while loop there.
must have *fixed* some *bug*. there is no justification
for this behaviour. if 'f' is of type ptr to fn, then *f is of
type fn ... and it is an expression not a name. **f should
be illegal etc etc.
brucee
On 4/30/05, rog@vitanuova.com <rog@vitanuova.com> wrote:
> > PCC had a particularly aggressive disregard for indirections
> > in such cases. if 'f' was a pointer to a function then ...
> >
> > f();
> > (*f)();
> > (***************************f)();
>
> surely this is inevitable if f ≡ &f ?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] pls. HELP porting problem
2005-04-29 15:25 ` Bruce Ellis
@ 2005-04-29 15:38 ` C H Forsyth
2005-04-29 16:09 ` Bruce Ellis
0 siblings, 1 reply; 11+ messages in thread
From: C H Forsyth @ 2005-04-29 15:38 UTC (permalink / raw)
To: 9fans
as i recall, this and several other peculiar effects
were the consequence of the process
by which the tree was rewritten.
it was along these lines. (i could of course go
off and look at the source but is it worthwhile?)
you might have thought it would leave the types
alone and then when pointer-to-function appeared
as the type of an expression to which () was applied
it would insert a dereference.
but instead it applied the f to &f transformation
so *****f involved not a while loop but repeatedly
introducing &f from the bottom of the tree and having
adjacent *& cancel out (similarly, &*). thus
******f
******&f
*****f
*****&f
****f
****&f
***f
etc (i might have got the wrong number of * at some points)
little fleas indeed!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] pls. HELP porting problem
2005-04-29 15:38 ` C H Forsyth
@ 2005-04-29 16:09 ` Bruce Ellis
0 siblings, 0 replies; 11+ messages in thread
From: Bruce Ellis @ 2005-04-29 16:09 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
you'd only notice it if you wanted it to do the right thing
for ptr to ptr to fn etc.
brucee
On 4/30/05, C H Forsyth <forsyth@vitanuova.com> wrote:
> as i recall, this and several other peculiar effects
> were the consequence of the process
> by which the tree was rewritten.
> it was along these lines. (i could of course go
> off and look at the source but is it worthwhile?)
> you might have thought it would leave the types
> alone and then when pointer-to-function appeared
> as the type of an expression to which () was applied
> it would insert a dereference.
> but instead it applied the f to &f transformation
> so *****f involved not a while loop but repeatedly
> introducing &f from the bottom of the tree and having
> adjacent *& cancel out (similarly, &*). thus
> ******f
> ******&f
> *****f
> *****&f
> ****f
> ****&f
> ***f
> etc (i might have got the wrong number of * at some points)
>
> little fleas indeed!
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] pls. HELP porting problem
2005-04-29 10:53 [9fans] pls. HELP porting problem Aharon Robbins
2005-04-29 11:59 ` Bruce Ellis
@ 2005-04-29 12:31 ` Brantley Coile
2005-04-29 18:06 ` Ah Q
1 sibling, 1 reply; 11+ messages in thread
From: Brantley Coile @ 2005-04-29 12:31 UTC (permalink / raw)
To: 9fans
> I think this actually worked in the V7 C compiler and PCC, no?
It did.
Brantley
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-04-30 9:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-29 10:53 [9fans] pls. HELP porting problem Aharon Robbins
2005-04-29 11:59 ` Bruce Ellis
2005-04-29 15:15 ` rog
[not found] ` <6ea05dc57c13d1df7359ec63990a0f8b@vitanuova.com>
2005-04-29 15:25 ` Bruce Ellis
2005-04-29 15:38 ` C H Forsyth
2005-04-29 16:09 ` Bruce Ellis
2005-04-29 12:31 ` Brantley Coile
2005-04-29 18:06 ` Ah Q
2005-04-29 21:43 ` [9fans] killing none's process arisawa
2005-04-29 21:48 ` Russ Cox
2005-04-30 9:03 ` [9fans] pls. HELP porting problem Charles Forsyth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).