This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Getting "char" from INTEGER_TYPE node
- From: Brendon Costa <bcosta at avdat dot com dot au>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 10 Nov 2006 05:57:14 +0000
- Subject: 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.