[C++ Patch] 28705 & koenig lookup
Thu Aug 31 21:07:00 GMT 2006
Nathan Sidwell wrote:
> This patch fixes bug 28705, but it impacts koenig lookup and DR 218.
> The actual ICE reported in 28705 is somewhat incidental.
> This patch changes G++ to ignore non-function non-variable entities
> during koenig lookup. This makes G++ accept strictly more programs than
> it did before. I don't think it causes G++ to reject a program it
> previously accepted.
That's a good thing.
However, we might still be changing G++ to accept a program that the
committee might later deem invalid, meaning that we'll have introduced
an extension, just to remove it again. The way that might happen is
that the committee might decide to include types in the overload set,
thereby making programs that we would deem unambiguous with your patch
We ICE now if we end up finding a type. If we fix it so that types
actually work, then the committee might decide that types don't count,
and we've again added an extension.
But, what if we just issue an error if the only thing we find is a type?
Wouldn't that be even more conservative? That program ICEs now, so
that's no worse. If finding types becomes OK, then we can add that
(650) 331-3385 x713
More information about the Gcc-patches