Re: [RFA] bug in symtab.c:lookup_block_symbol()'s search method

Jason Molenda
2001-09-10T11:32:00Z

On Mon, Sep 10, 2001 at 11:24:10AM -0700, Michael Snyder wrote:

> > + if (SYMBOL_SOURCE_NAME (sym)[0] > name[0])
> > + {
> > + break;
> > + }
>
> If this test works, then wouldn't some sort of strcmp test work too?

It is comparing unmangled names, so there may be space chars which
are not significant. I don't know enough about mangling to be
confident that I could put a strcmp in here safely. I'll try it
out later today and see if the testsuite happens to trip up on it.
The SYMBOL_MATCHES_NAME() call used for the actual comparison uses
util.c:strcmp_iw, which skips over whitespace.

(On the good news side, when I first started working on this loop,
I found that using strcmp() to detect matches produced a number of
testsuite regressions, helping to Show Me The Light.)

Jason