This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Proper test status if gdb test detects a g++ bug?
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Subject: Re: Proper test status if gdb test detects a g++ bug?
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 04 Feb 2001 08:56:25 -0200
- Cc: gdb at sources dot redhat dot com
- Organization: GCC Team, Red Hat
- References: <200102040827.AAA29200@bosch.cygnus.com>
On Feb 4, 2001, Michael Elizabeth Chastain <chastain@cygnus.com> wrote:
> [1] print_addr_of "hairyfunc5(int (*(*)(char *))(long))"
> [2] print_addr_of "hairyfunc5(int (*)(long) (*)(char *))"
> The argument type string comes from g++ stabs info.
Huh? All I see here is a demangler error. [1] is correct, but the
demangler is incorrectly printing [2].
> P. S. Here is a brief explanation why the arg type is incorrect
> as written. A pointer-to-function always has the following type:
> "returntype (*)(arglist)".
Nope. It has the form `T = RET (*PTR)(arglist)'. In this case
`PTR = RET2 (*PTR2)(arglist)'. Substituting PTR in T, you'll get [1],
not [2].
int hairyfunc5 (PFPc_PFl_i arg) =
int hairyfunc5 (PFl_i (*arg)(char *)) =
int hairyfunc5 (int (*(*arg)(char *))(long))
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me