public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9335: Inordinately long output when maximum template depth is exceeded
@ 2003-05-02 18:36 Giovanni Bajo
  0 siblings, 0 replies; 3+ messages in thread
From: Giovanni Bajo @ 2003-05-02 18:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9335; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<bangerth@ticam.utexas.edu>,
	<gcc-prs@gcc.gnu.org>
Cc:  
Subject: Re: c++/9335: Inordinately long output when maximum template depth is exceeded
Date: Fri, 2 May 2003 20:32:27 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9335
 
 For completeness, Comeau's diagnostic is:
 
 "pr9335.cpp", line 2: error: excessive recursion at instantiation of class
 "X<936>"
         static const int value = X<N-1>::value;
                                          ^
           detected during:
             instantiation of class "X<N> [with N=937]" at line 2
             instantiation of class "X<N> [with N=938]" at line 2
             instantiation of class "X<N> [with N=939]" at line 2
             instantiation of class "X<N> [with N=940]" at line 2
             instantiation of class "X<N> [with N=941]" at line 2
             [ 54 instantiation contexts not shown ]
             instantiation of class "X<N> [with N=996]" at line 2
             instantiation of class "X<N> [with N=997]" at line 2
             instantiation of class "X<N> [with N=998]" at line 2
             instantiation of class "X<N> [with N=999]" at line 2
             instantiation of class "X<N> [with N=1000]" at line 4
 
 Giovanni Bajo
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/9335: Inordinately long output when maximum template depth is exceeded
@ 2003-02-19  3:01 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-02-19  3:01 UTC (permalink / raw)
  To: bangerth, gcc-bugs, gcc-prs, nobody

Synopsis: Inordinately long output when maximum template depth is exceeded

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Feb 19 03:01:23 2003
State-Changed-Why:
    Still true

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9335


^ permalink raw reply	[flat|nested] 3+ messages in thread

* c++/9335: Inordinately long output when maximum template depth is exceeded
@ 2003-01-15 22:36 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-01-15 22:36 UTC (permalink / raw)
  To: gcc-gnats


>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 <int N> struct X {
    static const int value = X<N-1>::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:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-02 18:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-02 18:36 c++/9335: Inordinately long output when maximum template depth is exceeded Giovanni Bajo
  -- strict thread matches above, loose matches on Subject: below --
2003-02-19  3:01 bangerth
2003-01-15 22:36 bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).