Questions about GCC front end

Ramanand V Mandayam <>
14 Nov 2000 13:13:31 -0500

          From comp.compilers

Related articles
Questions about GCC front end (Ramanand V Mandayam) (2000-11-14)
Re: Questions about GCC front end (2000-11-17)
| List of all articles for this month |

From: Ramanand V Mandayam <>
Newsgroups: comp.compilers
Date: 14 Nov 2000 13:13:31 -0500
Organization: Compilers Central
Keywords: GCC
Posted-Date: 14 Nov 2000 13:13:31 EST


I have been working with the GCC (v2.95.2) front end for a small
project. I am using the (implicit) documentation available in the
various source files such as tree.def, tree.h, c-aux-info.c etc.

However, I have come across a situation that is somewhat confusing and
would appreciate any help in this regard. It appears (I may be wrong
-- this is where I need all the help I can get) that at the time when
the API functions in the file c-aux-info are invoked, the tool does
not distinguish between typedef names and explicit types (int, char,
struct x {...} etc.)

Here is an example:

typedef struct _int { int x; } ABCD;
typedef union _char { char x; } *XYZ;
typedef int INT;

XYZ myfunc_1 ( int x);
INT myfunc_2 ( int y);

        /* END EXAMPLE INPUT */

When parsed, the type information for the parameter 'x' of function
myfunc_1 (as also the parameter 'y' of function myfunc_2) have the
same attributes (TYPE_NAME, TREE_CODE, etc.) as the type information
for the return type "XYZ" of myfunc_1.

According to the documentation, the conditional
where t is the node containing the type information

should fail for the parameters x and y, but it repeatedly passes.

What gives. Should I be testing something else?

Thanks for any feedback and help.

Ramanand Mandayam

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.