Bad type mismatch in ADDR_EXPR from cp/class.c:build_vtbl_initializer
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Wed May 18 12:42:00 GMT 2005
If the following ever escapes the C++ frontend (who knows...)
/* Take the address of the function, considering it to be of an
appropriate generic type. */
init = build1 (ADDR_EXPR, vfunc_ptr_type_node, fn);
it'll be not nice.
(gdb) call debug_tree(t)
<addr_expr 0x401f8060
type <pointer_type 0x401b8a20 __vtbl_ptr_type
type <function_type 0x401b89b4 type <integer_type 0x4014957c int>
QI
....
constant invariant
arg 0 <function_decl 0x401f6a8c __comp_dtor
type <method_type 0x401e2d14 type <void_type 0x401589b4 void>
QI size <integer_cst 0x401411f8 8> unit size <integer_cst
0x40141210 1>
....
does it escape? Would using convert on the ADDR_EXPR of the correct
type to vfunc_ptr_type_node work?
Thanks,
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
More information about the Gcc
mailing list