This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C++: ICE 61
1999-08-08 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
* lex.c (do_identifier): If we find a hidden type after a global
was selected already, continue using the global.
This is probably OK. Please make sure there's a test-case checked in
along with the patch, if one isn't already in the tree.
Again, I'd prefer a clearer comment. Something like:
/* When we did name-lookup before, we will have eschewed implicit
typenames in favor of global bindings. Therefore, if
lookup_field returns an implicit typename, but ID is
not an implicit typename, then we should skip this one, too. */
I don't even quite believe this comment, but I think it's probably
truish. Basically, the whole concept here needs more commentary: why
do we have to re-lookup the name? Presumably because we don't yet
have a decent parser. Why do we do lookup_field, rather than just
lookup_name/lookup_name_real? Note that lookup_field will not return
functions. Why are we ignoring member functions here?
We need to unravel and understand this code, or we'll likely just
paper over one bug and introduce another. Do you have time to do the
detective work indicated above?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com