This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Having the AST tree representation closer to the source code
- To: gcc at gcc dot gnu dot org
- Subject: Having the AST tree representation closer to the source code
- From: Dennis Dams <dennis at research dot bell-labs dot com>
- Date: Wed, 24 Oct 2001 11:54:28 -0400 (EDT)
- Reply-To: dennis at research dot bell-labs dot com
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
------------------------------------------------------------------------------