This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Having the AST tree representation closer to the source code


Hi,

I'm doing some analysis for which I need the AST tree to reflect the
source code more precisely.

For example, given the following program:

int
main(void)
{
  int n, i, *p;

  p = (int *)(2*n) + i;

}

the rhs of the assignment occurs as a mult_expr in the tree, because
gcc does some factoring etc.
While for my purposes I would really prefer the rhs to occur as
literal as possible in the AST - even without implicit casts and
offset multiplications.

Are there switches in gcc that can help?
Or else, is it possible to change the workings of gcc without too much 
effort?

--Dennis.

-- 
------------------------------------------------------------------------------
Dennis R. Dams                      | EMAIL: D.Dams@tue.nl
(temporarily at:) Bell Labs         |    or: dennis@research.bell-labs.com
Lucent Technologies, MH 2C-305      | VOICE: +1 908 582 8859
600 Mountain Avenue                 |   FAX: +1 908 582 5857
Murray Hill, New Jersey 07974, USA  |   WEB: http://www.ics.ele.tue.nl/~dennis
------------------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]