From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20676 invoked by alias); 7 Sep 2013 12:04:00 -0000 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 Received: (qmail 20628 invoked by uid 48); 7 Sep 2013 12:03:57 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58352] infinite template instantiation depth errors Date: Sat, 07 Sep 2013 12:04: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-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail dot 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-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg00445.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58352 Daniel Kr=C3=BCgler changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #1 from Daniel Kr=C3=BCgler --- The code example has undefined behaviour and moving your specialization to = the top is required to make it work. You hit [temp.dep.candidate] p1: "For a function call where the postfix-expression is a dependent name, the candidate functions are found using the usual lookup rules (3.4.1, 3.4.2) except that: =E2=80=94 For the part of the lookup using unqualified name lookup (3.4.1),= only function declarations from the template definition context are found. [..] If the call would be ill-formed or would find a better match had the lookup within the associated namespaces considered all the function declarations w= ith external linkage introduced in those namespaces in all translation units, n= ot just considering those declarations found in the template definition and template instantiation contexts, then the program has undefined behavior." >>From gcc-bugs-return-429206-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 07 12:08:31 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 22649 invoked by alias); 7 Sep 2013 12:08:31 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 22615 invoked by uid 48); 7 Sep 2013 12:08:27 -0000 From: "1zeeky at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58352] infinite template instantiation depth errors Date: Sat, 07 Sep 2013 12:08: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-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: 1zeeky at gmail dot 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-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg00446.txt.bz2 Content-length: 376 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58352 --- Comment #2 from 1zeeky at gmail dot com --- I am aware that the code is invalid; I'm not saying there shouldn't be an error. The problem is, that g++ does not stop printing the error and needs to be killed to stop. At least mine doesn't, maybe my downstream g++, or some component (library) it uses, is broken somehow.