This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Mismatched types in ADDR_EXPR from c-typeck.c:build_function_call
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 18 May 2005 13:25:05 +0200 (CEST)
- Subject: Mismatched types in ADDR_EXPR from c-typeck.c:build_function_call
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/