Re: Problem with gimple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




this information is based on c-tree, not on GIMPLE, but they look very similar. (at least the initial version of GIMPLE, there seem to be hooks to convert it I've read somewhere)


rohan shah schrieb:
Sir,
there is something which i would like to point out
There is no declaration of a structure in GIMPLE
For eg
if the C file has
struct a
{
int x,y;
};

the corrosponding GIMPLE representation is just
typedef struct a struct struct a (even if the typedef is not present in the C file !!!)



gcc creates artificial type_decl's for structs. you can test with DECL_ARTIFICIAL if it's a typedef in source code.
if(DECL_ARTIFICIAL) TREE_TYPE is a record_type or a union_type



Another thing is that in a function declaration the type of the parameters is not specified in
gimple

there are two lists which represent the parameters of a function_decl:

both of them are lists connected with TREE_CHAIN
DECL_ARGUMENTS(function_decl):
	TREE_TYPE: type
	DECL_NAME: name

TYPE_ARG_TYPES(TREE_TYPE(function_decl)):
	TREE_PURPOSE: default argument

--
Stefan Strasser

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux