vla: enable sizeof operator for indirection
authorSanimir Agovic <sanimir.agovic@intel.com>
Sat, 12 Oct 2013 11:36:16 +0000 (12:36 +0100)
committerJoel Brobecker <brobecker@adacore.com>
Mon, 14 Apr 2014 16:14:11 +0000 (09:14 -0700)
commit3c8452d46ac23d455c30438d0885a738e02b56e1
treeee4e5f86ade80bff6748d6f4a7d67b51511b55ac
parent4ad88275f81a586e32e86351cc415a97d58ef448
vla: enable sizeof operator for indirection

This patch enables the sizeof operator for indirections:

1| void foo (size_t n) {
2|   int vla[n];
3|   int *vla_ptr = &vla;
4| }

(gdb) p sizeof(*vla_ptr)

yields sizeof (size_t) * n.

gdb/ChangeLog:

* eval.c (evaluate_subexp_for_sizeof) <UNOP_IND>: Create an indirect
value and retrieve the dynamic type size.
gdb/ChangeLog
gdb/eval.c
This page took 0.025121 seconds and 4 git commands to generate.