This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-1.0.3a: internal compiler error 364
- To: egcs-bugs at cygnus dot com
- Subject: egcs-1.0.3a: internal compiler error 364
- From: Dale Hagglund <rdh at best dot com>
- Date: 08 Jun 1998 05:20:30 -0700
I just compiled and started fiddling with egcs 1.0.3a on my freebsd
2.2.2-RELEASE system.
I get an "Internal compiler error 364" on the attached code. I've
already stripped down the program I was working on a bit. If you
change the type of the map key from _string_ to _int_ the compiler
error goes away. (There's still a ton of other warnings, no doubt
because I'm doing something stupid, broken, or both.)
The error messages reporting the compiler error refer to line 201 in
stl_function.h.
Let me know if you'd like the original un-stripped-down version of the
program, or the complete error output from this version.
Dale.
------------------------------ cut here ------------------------------
#include <string>
#include <vector>
#include <map>
#include <functional>
#include <algorithm>
using namespace std;
map<string, vector<double> > data;
template<class T>
class mean {
private:
T _total;
int _n;
public:
mean(bool d = false) : _total(0) {
}
void operator()(T x) {
_total += x;
_n++;
}
T result() {
return _total / _n;
}
};
void
ave(const pair<const string, vector<double> > &p, mean<double> &m)
{
}
main()
{
mean<double> m;
for_each(data.begin(), data.end(), bind2nd(ptr_fun(ave), m));
}
------------------------------ cut here ------------------------------