AST-tree in GCC

2007-09-24 Thread Johan Bohlin
Hi I want to extract the complete AST-tree from GCC (using 4.1.2).
I´ve tried to use -fdump-translation-unit but it seems like its dosent
include information in ex. for and if statements. If i use
-fdump-tree-orignal-raw i get each function but not the external variables
if they are not used in the function. My question is... Anyone knows a way
to get all information ? Maybe changing a flag in the source code or
something.


//Regards John



Re:Re:AST-tree in GCC

2007-09-25 Thread Johan Bohlin
Diego what do you mean by the IL ?

Thomas
-fdump-tree-gimple-raw dosent include global variable that are not used i
functions.
I need something like -fdump-translation-unit that dosent cut the body of
the function.


>Debugging dumps are always incomplete.  Mostly by design, but in
>general because we just dump what seems useful for debugging.  There
>is work in progress to stream out the IL in order to do link-time
>optimizations (search for LTO on the GCC wiki).
>Diego

>Perhaps you could also try
>-fdump-tree-gimple
>or
>-fdump-tree-gimple-raw

>In both cases you dump out the GIMPLE form, AST based.

>Best,

>T.


> Hi I want to extract the complete AST-tree from GCC (using 4.1.2).
> I´ve tried to use -fdump-translation-unit but it seems like its dosent
> include information in ex. for and if statements. If i use
> -fdump-tree-orignal-raw i get each function but not the external variables
> if they are not used in the function. My question is... Anyone knows a way
> to get all information ? Maybe changing a flag in the source code or
> something.
>
>
> //Regards John
>



Question regarding GCC fdump option

2007-11-05 Thread Johan Bohlin
Hi I have a question regarding gcc or g++ -fdump-tree-all-raw-details (.tu
file). I want to dump the entire C (not C++) AST tree the only way to do
this, without losing any information, is if I use g++  and
-fdump-tree-all-raw-details and i have some kind of error in the file. Can
I in some way change  a flag or edit a method in the source files so i can
use this option without having an error in my c file but get all the
information. Even better would be if i could use gcc.

//Johan (using gcc 4.2.1)