g++ generates symbols that c++filt can`t demangle

Peter Schmid schmid@ltoi.iap.physik.tu-darmstadt.de
Wed Feb 18 04:49:00 GMT 1998


g++ generates symbols that c++filt cannot demangle.
The name of the symbol is __Q26main.0_1Bi.2.

g++ -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1
/egcs-2.91.08/specs
gcc version egcs-2.91.08 980214 (gcc-2.8.0 release)
binutils-2.8.1.0.15.

Peter Schmid

cat t1.C
int main()
{
    class B
    {
    public:
        B(int x = 0){};
    };
    
    B Bt[5];
}

g++ -W -Wall -c t1.C
t1.C: In method `main()::B::B(int = 0)':
t1.C:6: warning: unused parameter `int x'
t1.C: In function `int main()':
t1.C:8: warning: unused variable `class main()::B Bt[5]'

nm -C t1.o
00000000 ? __FRAME_BEGIN__
00000000 t __Q26main.0_1Bi.2
00000000 t gcc2_compiled.
00000010 T main
nm t1.o | c++filt
00000000 ? __FRAME_BEGIN__
00000000 t __Q26main.0_1Bi.2
00000000 t gcc2_compiled.
00000010 T main





More information about the Gcc-bugs mailing list