[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: c++/4973: weird template instantiation
From: benko () sztaki ! hu
Date: 2001-11-30 8:47:57
[Download RAW message or body]
>Number: 4973
>Category: c++
>Synopsis: weird template instantiation
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 30 00:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Pal Benko
>Release: 3.0.2
>Organization:
>Environment:
SuSE7.1, i686
>Description:
Compiling the attached program I got
arta:~/c/proba$ /gml/shared/gcc-3.0.2/bin/g++ -Wall -ftemplate-depth-3 templit.cc
templit.cc:20: template instantiation depth exceeds maximum of 3 (use
-ftemplate-depth-NN to increase the maximum) instantiating `struct Net<8>'
templit.cc:20: instantiated from `Net<7>'
templit.cc:20: instantiated from `Net<6>'
templit.cc:20: instantiated from `Net<5>'
templit.cc:26: instantiated from here
templit.cc:20: invalid use of undefined type `struct Net<8>'
templit.cc:3: forward declaration of `struct Net<8>'
templit.cc: In function `int main()':
templit.cc:27: warning: unused variable `Net<4> n'
zsh: exit 1 /gml/shared/gcc-3.0.2/bin/g++ -Wall -ftemplate-depth-3 templit.cc
I think instantiating Net<7> should not be attempted.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="templit.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="templit.cc"
dGVtcGxhdGUgPGludCBEPgpzdHJ1Y3QgTmV0CnsKICBzdHJ1Y3QgU3ViTmV0CiAge307CgogIE5l
dCgpIHt9CiAgTmV0KHR5cGVuYW1lIE5ldDxEKzE+OjpTdWJOZXQgY29uc3QgJik7Cn07CgovLyAg
dGVtcGxhdGUgPD4KLy8gIHN0cnVjdCBOZXQ8NTQ+Ci8vICB7Ci8vICAgIHN0cnVjdCBTdWJOZXQK
Ly8gICAge307Ci8vICB9OwoKdGVtcGxhdGUgPGludCBEPgpOZXQ8RD46Ok5ldChOZXQ8RCsxPjo6
U3ViTmV0IGNvbnN0ICYpCnt9CgoKaW50Cm1haW4oKQp7CiAgTmV0PDU+OjpTdWJOZXQgczsKICBO
ZXQ8ND4gICAgICAgICBuKHMpOwoKICByZXR1cm4gMDsKfQo=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic