This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Getting "char" from INTEGER_TYPE node


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?

Thanks,
Brendon.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]