This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug?
- To: gcc-bugs at gcc dot gnu dot org
- Subject: bug?
- From: Jesus Avila Casa <javila at iies dot es>
- Date: Tue, 31 Aug 1999 00:22:59 +0200 (CEST)
I send a small example that gives me an internal compiler error.
gcc 2.95.1 version
Intel P-II MMX 233MHz
cd /home/javila/work/prueba6/
make main
g++ main.cc -o main
In file included from test_classes.hh:12,
from main.cc:2:
test_classes.cc:32: Internal compiler error.
test_classes.cc:32: Please submit a full bug report.
test_classes.cc:32: See
<URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
make: *** [main] Error 1
Compilation exited abnormally with code 2 at Mon Aug 30 22:44:47
I hope it's useful for you.
Kind regards,
Jesus.
...............................................
Jesus Avila
Telecom Eng. and PhD Student
ACM jesus.avila@acm.org
IEEE jesus.avila@ieee.org
Priv. javila@iies.es
...............................................
#include <iostream>
#include "test_classes.hh"
int main(int argc, char* argv[])
{
C<int> cc;
cout << "hola mundo\n";
return 0;
}
#ifndef Test_classes_hh
#define Test_classes_hh
class A;
class B;
template <class T> class C;
// ------------------------------------------------------------------------------
// TO AVOID COMPILING PROBLEMS, THE DEFINITIONS PART IS NOT COMPILED BUT INCLUDED
#ifndef Test_classes_cc
#include "test_classes.cc"
#endif
//------------------------------------------------------------------------------
#endif /* Test_classes_hh */
#ifndef Test_classes_cc
#define Test_classes_cc
#include <pair.h>
#ifndef Test_classes_hh
#include "test_classes.hh"
#endif
class A{
int first_datum;
public:
int second_datum;
};
class B: public A {
int third_datum;
};
template <class T> class C {
public:
class D;
B bb;
T tt;
D dd;
};
template <class BaseGraph>
class C<BaseGraph>::D : public pair<int,int> {
//public:
//char* N;
//int M;
};
//------------------------------------------------------------------------------
#endif /* Test_classes_cc */