This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] -Wid-clash-LEN broken
Mark Mitchell wrote:-
> In my opinion, we shouldn't be doing this in the hashtable at all.
Yes, I see what you mean.
> *If* we wish to continue to support this warning, the front-end lexer
> (i.e., c_lex when returning CPP_NAME) should set a bit on the
> TREE_IDENTIFIER to indicate "should be checked for clashes" and then
> we should make a final pass over the table to warn about possible
> identifier clashes. That eliminates the n^2 behavior (should be n log
> n in the number of identifiers -- you sort and then run through the
> sorted table doing strncmp), allows front-ends to use or not use this
> capability, and sepparates it out from the main path of identifier
> table use. Then we need to document which front-ends actually use the
> On the other hand, I think this warning is pretty much useless at this
> point, and I think we could probably just remove this warning.
I'd be quite happy to remove it altogether, with a warning when it is
passed on the CL to say that it is no longer supported. I doubt there
are any compilers that people care about still being used that are
broken to this extent. After all, GCC is not unique in a lot of
things in the teens of length, and no-one has complained.
Let me know what you'd like me to do.