Re: Accessor macro wrappers removal [Re: [patch] static_kind -> bit0, bit1]

Daniel Jacobowitz
2008-09-26T12:55:09Z

On Fri, Sep 26, 2008 at 06:43:09AM +0200, Jan Kratochvil wrote:
> On Sat, 20 Sep 2008 00:12:21 +0200, Joel Brobecker wrote:
> > > Also I do not understand why exist all the macros like this one at all:
> > > #define TYPE_MAIN_TYPE(thistype) (thistype)->main_type
> > > Why we cannot use it expanded? This way it is always one (or more)
> > > "tags"-jump (VIM ctrl-]) indirections while navigating the source files.
> >
> > Personally, I find them to be very useful to quickly find who is using
> > field "main_type" in struct type.
>
> How does it differ from
> grep -- '->main_type\>' *.[ch]
> ?

"in struct type" is the difference.

For main_type it's not too bad. But for e.g. TYPE_FIELD_TYPE you can
see the problem; there's lots of things that have a type. If you're
looking just for the ones that come from a "struct field", it can be
pretty awful to locate them all.

--
Daniel Jacobowitz
CodeSourcery