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]

g++ 2.95.2 internal error parsing a template function operator*


Hi,

the following code gives an internal compiler error with g++ 2.95.2.

$ cat test.cpp
struct S { };

template <class T>
T operator* (const S&, const S&)
{
    return T ();
}


int main ()
{
    return operator*<int>(S (), S ());  
}


$ g++ -c -fhonor-std -g -ftemplate-depth-32 --pedantic -Wall test.cpp
test.cpp: In function `int main()':
test.cpp:14: Internal compiler error.
test.cpp:14: Please submit a full bug report.
test.cpp:14: See
<URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

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