From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3747 invoked by alias); 4 Jun 2012 16:38:42 -0000 Received: (qmail 3518 invoked by uid 22791); 4 Jun 2012 16:38:40 -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; Mon, 04 Jun 2012 16:38:26 +0000 From: "keean@fry-it.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53573] template type dependent name resolution broken Date: Mon, 04 Jun 2012 16:38: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/msg00188.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53573 --- Comment #4 from Keean Schupke 2012-06-04 16:38:21 UT= C --- =46rom C++ Standard N3242=3D11-0012 14.6 Name Resolution 10. If a name does not depend on a template-parameter (as de=EF=AC=81ned in= 14.6.2), a declaration (or set of declarations) for that name shall be in scope at the point where the name appears in the template de=EF=AC=81nition; the name is= bound to the declaration (or declarations) found at that point and this binding is n= ot a=EF=AC=80ected by declarations that are visible at the point of instantiat= ion. [Example: void f(char); template void g(T t) { f(1); // f(char) f(T(1)); // dependent f(t); // dependent dd++; // not dependent // error: declaration for dd not found } enum E { e }; void f(E); double dd; void h() { g(e); // will cause one call of f(char) followed // by two calls of f(E) g(=E2=80=99a=E2=80=99); // will cause three calls of f(char) } =E2=80=94 end example ]