This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-fdump-translation-unit[-option]
- From: "J. Buchanan" <buchanan at iinet dot net dot au>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 15 Mar 2004 15:43:49 +1100
- Subject: -fdump-translation-unit[-option]
The docs say that -fdump-translation-unit[-option] which is valid for
C takes the optional -option from the C++-only
-fdump-tree-switch-option options, and I chose -original. But it
doesn't seem to work. I have a C source code file, test.c, that looks
like this:
int main()
{
char *foo = "Hello World";
puts(foo);
return 0;
}
I've left out #include <stdio.h> because I don't want a dump of all
the header file stuff, nor any of the builtins stuff. I just want the
pre-optimised tree structures that are generated for this C file. But
all I can get is a massive -fdump-translation-unit effected .tu file
which shows the contents of the translation unit with a whole load of
stuff I don't want.
How can I get just the trees that were made for the particular source
file? I'd like to examine this because I want to write a front end
and learn how the C front end compiles sources into trees. I want
really slim output, as above.
Thanks,
James