[RFC] -Wid-clash-LEN broken
Neil Booth
neil@daikokuya.demon.co.uk
Sun May 20 01:23:00 GMT 2001
My hashtable patch inadvertently broke warning about identifier
clashes. There are 2 problems:
1) It now only does so for the C front ends, since the test is
in the wrong place (make_identifier), which is called only
when a token is passed from cpplib to the front ends.
2) It doesn't know whether it's the first time the identifier
has been seen or not.
The obvious fix to both is to make such a warning a capability of
hashtable.c, rather than somewhere in stringpool.c where it
looks distinctly out of place.
However, hashtable.c cannot distinguish between an identifier used
solely by cpplib (say a macro definition), and one that gets passed to
the front ends. Shall we consider this a new feature and a goodness,
or try something ugly to work around it. (I'm not really sure what
would work, either - after all our abstracting hashtable.c only knows
about a string and a length now!).
Neil.
More information about the Gcc
mailing list