This is the mail archive of the
mailing list for the GCC project.
(fyi) gcc 3.3.1, small change in 'operator int' method name
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: carlton at kealia dot com, drow at mvista dot com
- Cc: gcc at sources dot redhat dot com
- Date: Wed, 9 Jul 2003 11:09:57 -0400
- Subject: (fyi) gcc 3.3.1, small change in 'operator int' method name
I was looking at the differences between gcc 3.3 and gcc-3_3-branch
(soon to be gcc 3.3.1) and I found a small difference in conversion
operator encoding with -gstabs+. I think gdb already handles this
correctly but I just wanted to mention it.
Attached is a small example program with two conversion operators.
With gcc 3.3 -gstabs+ the conversion operators are encoded like this:
With gcc gcc-3_3-branch%20030707 -gstabs+ (and also gcc HEAD%20030707)
the conversion operators are encoded like this:
gdb 5.3 has a little glitch when it handles the new 'operator 1' method
name. is_type_conversion_operator does not recognize them as operator
names, so gdb prints their names as 'int operator int()', which is
gdb gdb_6_0-branch and gdb HEAD have new code in the stabs reader,
update_method_name_from_physname. This code discards the method name
'operator 1' and replaces it with a a demangled version of
'ZN3FoocviEv'. So these versions of gdb don't even notice the change
from 'operator i' to 'operator 1'. The updated method name is always
'operator int' and is_type_conversion_operator always works correctly.
dbxout.c in gcc has not changed in the gcc 3.3 branch since the gcc 3.3
release. So this feels like an unintended change in gcc.
I just wanted to let y'all know about the method name change, just in
case it's ever important later. Also I wanted to check that I
understand update_method_name_from_physname properly.
operator int ();
operator double ();
Foo::Foo (int member)
: member_ (member)
return 1.0 * member_;
int main ()
Foo my_foo (117);