This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug report



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() { }
------------------------------------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]