This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/508: ICE on ,unusualī template use



>Number:         508
>Category:       c++
>Synopsis:       ICE on ,unusualī template use
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 05 14:26:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     German Tischler
>Release:        unknown-1.0
>Organization:
>Environment:
gcc version 2.95.2 19991024 (release)
FreeBSD
>Description:
gcc ices during template instantiation of an operator
when two (or more) template parameters are present
and template parameter m is of type provided by
parameter n (n < m). Source code is

//---

template <typename N,N e> struct A {};
template <typename N,N e> void operator<< (int, A<N,e> const & o) {}

int main()
{ 
        A<bool,0> a;
        operator<< <bool,0>(0,a); 
}

//---
>How-To-Repeat:
try to compile the above source
>Fix:
workaround: donīt use the above construction
(I cannot imagine where it would be hard to work around
it)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="dumb4.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="dumb4.ii"

IyAxICJkdW1iNC5jcHAiCnRlbXBsYXRlIDx0eXBlbmFtZSBOLE4gZT4gc3RydWN0IEEge307CnRl
bXBsYXRlIDx0eXBlbmFtZSBOLE4gZT4gdm9pZCBvcGVyYXRvcjw8IChpbnQsIEE8TixlPiBjb25z
dCAmIG8pIHt9CgppbnQgbWFpbigpCnsgCglBPGJvb2wsMD4gYTsKCW9wZXJhdG9yPDwgPGJvb2ws
MD4oMCxhKTsgCn0K

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]