> > I am having some trouble with getting type names as declared by the user > > in source. In particular if i have two functions: > > > > void Function(int i); > > void Function(char c); > > > > when processing the parameters i get an INTEGER_TYPE node in the > > parameter list for both function as expected, however > > IDENTIFIER_POINTER(DECL_NAME(TYPE_NAME(node))) returns the string "int" > > for both nodes. I would have expected one to be "int" and the other to > > be "char". Looking at the TYPE_PRECISION for these nodes i get correct > > values though, i.e. one is 8 bit precision, the other is 32 bit. > > > > How can i get the "char" string when a user uses char types instead of > > "int" strings?
After more debugging, the problem was with the type I was obtaining the name of. I was using DECL_ARG_TYPE() to obtain it and not TREE_TYPE() on the function parameter node. This was giving me a wider integer type parameter instead of the type that the user declared. Brendon.