wrong public reference (g++ 2.8.0)
Igor Levko
hornet@reksoft.ru
Thu Mar 19 03:31:00 GMT 1998
Hello everybody,
Having tried gcc 2.8.0, I got it after compiling egcs 1.0.1 (for Solaric
2.5.1 SPARC5),
I found out that the compiler generated wrong public reference
when I had compiled the things like that:
typedef const struct {
int x;
} Test, *pTest;
void foo(pTest);
Test t = {0};
int main()
{
foo(&t);
return 0;
}
The problem is that if you try to print name list of the object file
using '/usr/ccs/bin/nm' you can see that the public name of 'foo' looks
like 'foo__FPC3._0'
and 'c++filt' demangls it as foo(._0 const *) that is wrong !!!
BUT using g++ v.2.7.2.3 the name looks 'foo__FPCC4Test' and after
demangling 'foo(Test const const *)' that is right.
So, Is it the bug or the feature of the release of gcc ???
I would greatly appreciate your answering me if this bug (?) was fixed
in egcs 1.0.2.
Best regards,
Igor Levko
More information about the Gcc-bugs
mailing list