I got this message:
Canellas
canellas@elefante.com.br
Mon Jul 10 06:58:00 GMT 2000
Inernal compiler error 980715.
Plase submit a full bug report to 'egcs-bugs@egcs.cugnus.com'.
See <URL:http:/egcs.cygnus.com/faq.html#bugreport> for details
I am using egcs version 2.91.66 with Linux kener version 2.2.14-1.5.0.
I called g++ like this: g++ -c -g threads_p1.cc.
threads_p1.cc is the name of the file.
I was trying to compile the folowing code:
#include <pthread.h>
#include <ostream.h>
#include <stdio.h>
template <class M>
void *sendSeq(void *m) {
return 0;
}
struct two_args {
int arg1;
int arg2;
};
void *needs_2_args(void *_2args){
struct two_args *ta = (struct two_args *)_2args;
ta->arg1++;
ta->arg2--;
return 0;
}
int main() {
pthread_t t;
struct two_args args;
int error = pthread_create(&t, NULL, sendSeq<int>, (void *)&args);
if (error != 0)
cout << "ERROR";
else
cout <<"OK";
getchar();
}
As you can see, I am a beginner in threads, and I was trying to combine
function templates and threads.
Thanks,
Rodrigo Canellas
More information about the Gcc-bugs
mailing list