From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5862 invoked by alias); 20 May 2011 19:31:00 -0000 Received: (qmail 5774 invoked by uid 22791); 20 May 2011 19:30:59 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from vaxjo.synopsys.com (HELO vaxjo.synopsys.com) (198.182.60.75) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 May 2011 19:30:46 +0000 Received: from maiden.synopsys.com (maiden.synopsys.com [146.225.100.170]) by vaxjo.synopsys.com (Postfix) with ESMTP id 7B356DC33; Fri, 20 May 2011 12:30:45 -0700 (PDT) Received: from godel.synopsys.com (localhost [127.0.0.1]) by maiden.synopsys.com (8.9.1/8.9.1) with ESMTP id MAA09522; Fri, 20 May 2011 12:30:41 -0700 (PDT) Received: from godel.synopsys.com (localhost [127.0.0.1]) by godel.synopsys.com (8.13.1/8.12.3) with ESMTP id p4KJUfHB004961; Fri, 20 May 2011 12:30:41 -0700 Received: (from jbuck@localhost) by godel.synopsys.com (8.13.1/8.13.1/Submit) id p4KJUZ9g004941; Fri, 20 May 2011 12:30:35 -0700 Date: Sat, 21 May 2011 00:32:00 -0000 From: Joe Buck To: Jason Merrill Cc: gcc-patches List , Benjamin Kosnik , libstdc++ Subject: Re: RFA (libstdc++): C++/v3 PATCH for c++/24163 (lookup in dependent bases) and c++/29131 Message-ID: <20110520193035.GA30195@synopsys.com> References: <4DD69790.8070101@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DD69790.8070101@redhat.com> User-Agent: Mutt/1.4.1i Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg01506.txt.bz2 On Fri, May 20, 2011 at 09:32:16AM -0700, Jason Merrill wrote: > G++ has had a long-standing bug with unqualified name resolution in > templates: if we didn't find any declaration when looking up a name in > the template definition, we would do an additional unqualified lookup at > the point of instantiation. This led to incorrectly finding > namespace-scope functions declared later (29131) and member functions of > dependent bases (24163). This patch fixes that bug. I get the impression that most competing C++ compilers (other than the old HP compiler) were (or are) very loose about that rule. > To be friendly to users, the patch also allows affected code to compile > with -fpermissive and provides suggestions about how to fix the code: > either declaring the desired function earlier (29131) or explicitly > qualifying the name with this-> or Class:: (24163). I think that it's quite likely that there is a lot of C++ code out there that depends on this bug to compile. So I'm glad that you've included user guidance in the error messages, and it would be interesting to see how much code is affected when, say, compiling a distro.