[PATCH 4/4] typeof: examine it at show-time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unless an explicit call to examine_pointer_target() or
get_base_type() is made, the base type of pointers are
*not* examined via the usual recursive examine_symbol_type().
That means that it is possible to call show_typename()
on a non-fully examined type which is wrong (for example,
because SYM_TYPEOFs may not be converted).

So, call examine_pointer_target() on pointers when trying
to display them.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 show-parse.c              | 1 +
 validation/eval/typeof0.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/show-parse.c b/show-parse.c
index 371041675..80125e741 100644
--- a/show-parse.c
+++ b/show-parse.c
@@ -337,6 +337,7 @@ deeper:
 		mod = sym->ctype.modifiers;
 		as = sym->ctype.as;
 		was_ptr = 1;
+		examine_pointer_target(sym);
 		break;
 
 	case SYM_FN:
diff --git a/validation/eval/typeof0.c b/validation/eval/typeof0.c
index abef63865..12b086608 100644
--- a/validation/eval/typeof0.c
+++ b/validation/eval/typeof0.c
@@ -4,7 +4,6 @@ static typeof(i) *ptr;
 /*
  * check-name: eval-typeof0
  * check-command: test-show-type $file
- * check-known-to-fail
  *
  * check-output-ignore
  * check-output-excludes: unknown type
-- 
2.24.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux