This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug report
- To: gcc-bugs at gcc dot gnu dot org
- Subject: bug report
- From: Matteo Ceroni <ceroni at students dot cs dot unibo dot it>
- Date: Tue, 11 Jan 2000 13:44:35 +0100 (CET)
Hi,
g++ said I found a bug:
------------------------------------------------------------------------------------------------
> g++ test.cpp
test.cpp:8: Internal compiler error 290.
test.cpp:8: Please submit a full bug report.
test.cpp:8: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
------------------------------------------------------------------------------------------------
Here is the source file:
------------------------------------------------------------------------------------------------
#include<functional> // "less" definition
struct Person {
int height;
int age;
};
template<> bool less(const Person& a, const Person& b) { } // wrong attempt to specialize
// "less"
------------------------------------------------------------------------------------------------
I'm using g++ 2.95.2 (Mingw32 distribution for Windows95). In case your header files are
different from mine, here is a bare program that fails as well:
------------------------------------------------------------------------------------------------
template <class T>
struct foo {
bool operator()() { }
};
template<> bool foo() { }
------------------------------------------------------------------------------------------------