Internal compiler error 981006
David Mazieres
dm@reeducation-labor.lcs.mit.edu
Sun Nov 15 00:57:00 GMT 1998
The following C++ code produces Internal compiler error 981006 with
the latest version of egcs 1.2. It compiles fine with g++ 2.8.1, egcs
1.1, and earlier snapshots of the 1.2 branch.
% c++ -Wall -c -O 981006.C
981006.C: In method `void itree<int,timecb_t>::foo(const time_t &)':
981006.C:30: instantiated from here
981006.C:19: Internal compiler error 981006.
981006.C:19: Please submit a full bug report to `egcs-bugs@cygnus.com'.
%
Thanks,
David
==
typedef int time_t;
template<class R, class B1> struct callback {
virtual R operator() (B1) = 0;
virtual ~callback () {}
};
template<class C, class R, class B1, class A1, class AA1>
static inline callback<R, B1> *
wrap (C *c, R (C::*f) (A1, B1), const AA1 &a1)
{
return 0;
}
template<class K, class V>
struct itree {
itree () {}
int kvcmp (const K *k, const V *v) { return 0; }
void foo (const K &k) { wrap (this, &kvcmp, &k); }
};
struct timecb_t {
time_t tm;
};
static itree<time_t, timecb_t> timecbs;
void
timecb_remove (timecb_t *to)
{
timecbs.foo (to->tm);
}
More information about the Gcc-bugs
mailing list