Mismatched types in ADDR_EXPR from c-typeck.c:build_function_call
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Wed May 18 12:40:00 GMT 2005
The following snippet
/* Differs from default_conversion by not setting TREE_ADDRESSABLE
(because calling an inline function does not mean the function
needs to be separately compiled). */
fntype = build_type_variant (TREE_TYPE (function),
TREE_READONLY (function),
TREE_THIS_VOLATILE (function));
fundecl = function;
function = build1 (ADDR_EXPR, build_pointer_type (fntype),
function);
purposely builds an ADDR_EXPR tree with mismatched types:
<addr_expr 0x4028c940
type <pointer_type 0x40290510
type <function_type 0x402904a4 type <integer_type 0x40149510 int>
readonly QI
....
readonly constant invariant
arg 0 <function_decl 0x4018f870 __builtin_constant_p
type <function_type 0x40158360 type <integer_type 0x40149510 int>
QI
....
why? Do we (want to) allow this kind of mismatch in ADDR_EXPRs?
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