This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] 28705 & koenig lookup
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
- Date: Thu, 31 Aug 2006 13:46:29 -0700
- Subject: Re: [C++ Patch] 28705 & koenig lookup
- References: <44F31B8B.2000004@codesourcery.com>
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
ambiguous.
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
behavior.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713