From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5661 invoked by alias); 15 Jan 2003 22:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 5643 invoked by uid 71); 15 Jan 2003 22:36:00 -0000 Resent-Date: 15 Jan 2003 22:36:00 -0000 Resent-Message-ID: <20030115223600.5641.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, bangerth@ticam.utexas.edu Received: (qmail 3441 invoked by uid 61); 15 Jan 2003 22:28:53 -0000 Message-Id: <20030115222853.3440.qmail@sources.redhat.com> Date: Wed, 15 Jan 2003 22:36:00 -0000 From: bangerth@ticam.utexas.edu Reply-To: bangerth@ticam.utexas.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9335: Inordinately long output when maximum template depth is exceeded X-SW-Source: 2003-01/txt/msg00985.txt.bz2 List-Id: >Number: 9335 >Category: c++ >Synopsis: Inordinately long output when maximum template depth is exceeded >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Wed Jan 15 14:36:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: Wolfgang Bangerth >Release: unknown-1.0 >Organization: >Environment: all versions of gcc >Description: This template meta-programming equivalent of an infinite loop ------------------------ template struct X { static const int value = X::value; }; template struct X<1000>; ------------------------ generates inordinately long and un-useful output, namely one line per intermediate class: g/a> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.cc x.cc:2: error: template instantiation depth exceeds maximum of 500 (use -ftemplate-depth-NN to increase the maximum) instantiating `struct X<500>' x.cc:2: instantiated from `X<501>' x.cc:2: instantiated from `X<502>' x.cc:2: instantiated from `X<503>' [...] x.cc:2: instantiated from `X<1000>' x.cc:4: instantiated from here x.cc:2: error: incomplete type `X<500>' does not have member `value' I think this should be cut-down somehow. Since the default value for -ftemplate-depth has been raised from 17 to 500, showing the whole list is no longer useful. On the other hand, this is really a very minor nuisance, so I lowered all priorities for this one. W. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: