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]

[RFC] -Wid-clash-LEN broken


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.


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