c++/1509: compiler internal error on function template parameter

wanderer@rsu.ru wanderer@rsu.ru
Mon Dec 25 04:16:00 GMT 2000


>Number:         1509
>Category:       c++
>Synopsis:       compiler internal error on function template parameter
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 25 04:16:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir Merzliakov
>Release:        gcc version 2.97 20001224 (experimental)
>Organization:
>Environment:
CodeSourcery's Online Test Compilation
>Description:
/tmp/@30152.7.cc: In function `int main()':
/tmp/@30152.7.cc:15: Internal compiler error in convert_nontype_argument, at 
cp/pt.c:3096
>How-To-Repeat:
template<class T>
struct A {
  typedef int F();
};

template<class T, A<T>::F f>
//template<class T, int f()>
struct B {
  static int g() { return f(); };
};

int f() { return 0; };

int main() {
  return B<int,&f>::g();
};
>Fix:
use explicit functional type
comment string with bug and uncomment next
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-bugs mailing list