This is the mail archive of the
mailing list for the GCC project.
[RFC] -Wid-clash-LEN broken
- To: gcc at gcc dot gnu dot org
- Subject: [RFC] -Wid-clash-LEN broken
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Sun, 20 May 2001 09:23:35 +0100
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!).