Re: working on type declaration

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

 



Thanks for the help, I will try to find.

On 16/03/2011 22:29, Ian Lance Taylor wrote:
<piervit@xxxxxxxxxxx> writes:

I would like to know at which level of GCC (GENERICS, GIMPLE...) I
could get informations about the C types (created with typedef) which
are defined.

Types are represented in GENERIC.  GIMPLE points to GENERIC as needed.

I would like to parse type definition in order to know if the type is
a pointer or not, for exemple, if I have the following type:

typedef struct _account{
  int    account_number;
  float  balance;
} * account;


I have tried to look at GIMPLE and IPA, however it looks like, at this
state, the work is already done and the use of the type are replaced
by the use of a "struct account * ". Moreover I can't find where this
struct is keept in gcc.

Any variable of that type will point to the TYPE_DECL which represents
the type.  In the C frontend, the namespace scope will have "account"
pointing to the TYPE_DECL; see c-decl.c.  After the C frontend, e.g., in
GIMPLE, that mapping is gone.

Ian




[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