http://llvm.org/bugs/show_bug.cgi?id=6781
Summary: Template diagnostics should suppress instantiation
contexts when there are lots
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
This testcase:
template <int N> struct X {
static const int value = X<N-1>::value;
};
template struct X<1000>;
compiles to this with gcc:
testsuite/9335.cc:2:38: error: template instantiation depth exceeds maximum of
1024 (use -ftemplate-depth= to increase the maximum) instantiating ‘struct
X<-0x00000000000000018>’
testsuite/9335.cc:2:38: instantiated from ‘const int
X<-0x00000000000000017>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int
X<-0x00000000000000016>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int
X<-0x00000000000000015>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int
X<-0x00000000000000014>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int
X<-0x00000000000000013>::value’
testsuite/9335.cc:2:38: [ skipping 1014 instantiation contexts ]
testsuite/9335.cc:2:38: instantiated from ‘const int X<996>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int X<997>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int X<998>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int X<999>::value’
testsuite/9335.cc:2:38: instantiated from ‘const int X<1000>::value’
testsuite/9335.cc:4:17: instantiated from here
Clang emits all of those instantiation contexts, which is not helpful.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs