Fatal bug in 981105 sources regarding call of int T::operator()() on temporary
Niall Smart
nialls@euristix.ie
Mon Nov 9 03:23:00 GMT 1998
Hello,
The following code causes an internal compiler error on 19981105 sources:
struct T
{
int operator()()
{
return 0;
}
};
int
main()
{
int i = T()();
}
[njs3@cnet0000 ~]$ g++ test.cpp
test.cpp: In function `int main()':
test.cpp:15: Internal compiler error.
test.cpp:15: Please submit a full bug report to `egcs-bugs@cygnus.com'.
[njs3@cnet0000 ~]$ g++ -v
Reading specs from /homes/njs3/pub/cc/egcs-981105/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.92.18/specs
gcc version egcs-2.92.18 19981105 (gcc2 ss-980609 experimental)
A similar error occurs for:
struct T { ... };
void foo(int);
int
main()
{
foo(T()());
}
Please maintain the Cc list for this bug report.
Regards,
Niall Smart
More information about the Gcc-bugs
mailing list