From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10329 invoked by alias); 5 Jun 2012 10:15:57 -0000 Received: (qmail 10319 invoked by uid 22791); 5 Jun 2012 10:15:55 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jun 2012 10:15:19 +0000 From: "keean@fry-it.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53573] template type dependent name resolution broken Date: Tue, 05 Jun 2012 10:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: keean@fry-it.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg00231.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53573 --- Comment #8 from Keean Schupke 2012-06-05 10:15:18 UT= C --- (In reply to comment #7) Have a read of the C++ standard, the example given in: N3242=3D11-0012 14.6 Name Resolution: paragraph 10 Which I have pasted above into comment #4 and the extract from C++ Special Edition (Technicalities C.13.8.3) which is pasted in comment #3. How do you interpret these two?=20 > (In reply to comment #6) > > The suggested work around in the error message 'adding -fpermissive' to > > gcc-4.7.0 does not fix the problem as suggested by the error message. T= his > > would suggest the compiler is not displaying the correct error message = for the > > problem. > >=20 > > g++ -fpermissive test.cpp > >=20 > > Still generates: > >=20 > > test.cpp: In instantiation of =E2=80=98T f(T) [with T =3D int]=E2=80=99: > > test.cpp:27:9: required from here > > test.cpp:18:12: error: =E2=80=98g=E2=80=99 was not declared in this sco= pe, and no declarations > > were found by argument-dependent lookup at the point of instantiation > > [-fpermissive] > > test.cpp:21:5: note: =E2=80=98int g(int)=E2=80=99 declared here, later = in the translation unit > >=20 >=20 > With GCC 4.8 revision 187148, -fpermissive generates a warning as it shou= ld. > However, -fpermissive is not meant to fix anything, it is just a work-aro= und to > make non-standard code compile. >=20 > I am not sure if this is a bug or not, so I am not touching the status.