This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Strange case for expect_type
- From: Paul Hilfinger <Hilfinger at adacore dot com>
- To: gdb at sourceware dot org
- Date: Wed, 28 Nov 2007 03:45:49 -0500 (EST)
- Subject: Strange case for expect_type
- Reply-to: Hilfinger at adacore dot com
Can anyone explain this code fragment from evaluate_subexp_standard?
case UNOP_IND:
if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR)
expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
arg1 = evaluate_subexp (expect_type, exp, pos, noside);
It SEEMS to be saying that if I "expect" type T* from expression *E, then
I should expect type T from E. Say what? Thanks for any help.
Paul Hilfinger