From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23791 invoked by alias); 4 Nov 2004 14:17:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23772 invoked by uid 48); 4 Nov 2004 14:17:15 -0000 Date: Thu, 04 Nov 2004 14:17:00 -0000 From: "rguenth at tat dot physik dot uni-tuebingen dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20041104141706.18296.rguenth@tat.physik.uni-tuebingen.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/18296] New: Misleading diagnostic for recursive template instantiation X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg00444.txt.bz2 List-Id: template struct CompFwd; struct Brick; template struct Engine; template class Array; template struct ComponentView; template struct ComponentView > { typedef Array Subject_t; typedef typename Subject_t::Engine_t Engine_t; typedef Array > Type_t; }; template struct Array { typedef Engine Engine_t; typedef Array This_t; typename ComponentView::Type_t comp(int i1) const; }; typedef Array<1, double, Brick> Array_t; typedef ComponentView::Type_t CView_t; causes g++ to emit: tests> g++-3.4 -c notype.cpp notype.cpp: In instantiation of `Array<1, double, Brick>': notype.cpp:19: instantiated from `ComponentView' notype.cpp:36: instantiated from here notype.cpp:30: error: no type named `Type_t' in `struct ComponentView' which could be improved to mention the missing of the type is caused by aborted recursive instantiation of struct ComponentView. At the moment the diagnostic is at least misleading, as there is a Type_t in struct ComponentView. -- Summary: Misleading diagnostic for recursive template instantiation Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18296