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]

Re: Hack in gcc/c-decl.c?


On Dec 29, 2005, at 12:38 AM, Domagoj D wrote:
Sorry, I didn't see that each identifier *is* a lang_identifier, that's
a weird way to keep bindings. It's not that easy for someone new to GCC
to get around the code. What was the design decision behind that hack
(instead of something like:


struct tree_identifier {
  struct tree_common common;
  struct c_binding *binds[3];
  struct ht_identifier id;
})?

That can't work, not all tree_identifiers have a c_binding, for example, java doesn't.


Also, not all identifiers in all languages have an ht_identifier, again, for example, java doesn't.

After you check all the language front ends, (grep "lang_ident", it only takes a few seconds), you discover that the only thing they have in common is common.

I see that make_node_stat allocates a large enough piece of
memory, but which function actually writes to
I_SYMBOL_X(node)->Y_binding ?

Grep should find it, why not use that?


grep("symbol_binding"), then grep what you find, then just look at those 20 places.

If you have a patch that makes gcc more understandable, more conforming to what most people would expect, faster and easier to maintain and(/or?) smaller please submit it. :-)


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