pointer elimination in C

Karen Miller <miller@crx.ece.cmu.edu>
Tue, 5 Oct 1993 14:27:17 GMT

          From comp.compilers

Related articles
pointer elimination in C miller@crx.ece.cmu.edu (Karen Miller) (1993-10-05)
Re:pointer elimination in C ghiya@flo.cs.mcgill.ca (1993-10-06)
Re: pointer elimination in C donawa@bluebeard.cs.mcgill.ca (Chris DONAWA) (1993-10-10)
Re: Re:pointer elimination in C grunwald@foobar.cs.colorado.edu (1993-10-17)
Re: pointer elimination in C doug@netcom.com (1993-10-19)
Re: pointer elimination in C pop@dcs.gla.ac.uk (Robin Popplestone) (1993-10-22)
Re: pointer elimination in C macrakis@osf.org (1993-10-22)
[7 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: Karen Miller <miller@crx.ece.cmu.edu>
Keywords: C, analysis, question
Organization: Compilers Central
Date: Tue, 5 Oct 1993 14:27:17 GMT

hi.


I am translating C into another language which does not implement pointers.


Has anyone done any work on understanding what a particular pointer does.
Does anyone have an algorithm for eliminating or replacing pointers in C
code?


I know that in general this is very difficult to do but perhaps for
specific cases a solution may exist (i.e. recognizing when pointers are
only being used as call by reference)


Any suggestions or "pointers" will be appreciated.


example pointer elimination:


{
  int x,y;
  int *p; int *q;


  p = &x;
  q = &y;


  *p = *q + 1;
}


can be translated to x = y + 1;


thanks, karen
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.