Re: [PATCH 2/2] handle VLA in a struct or union

Tom Tromey
2014-05-09T21:08:29Z

Sanimir> As Joel has moved the heavy work out of the cases into separate
Sanimir> function how about doing the same for arrays and unions
Sanimir> (resolve_dynamic_compound)?

Done on my branch.

Sanimir> How about adding a gdb_assert to ensure NFIELDS is > 0. I know
Sanimir> this cannot happen in this particular case but in others it
Sanimir> might and one may assume that a struct has at least a member
Sanimir> which is not the case.

Also done.

Thanks for your review.

Sanimir> As you have pointed out the limitation of vla within arrays,
Sanimir> this might as well serve as a test case that we deal with it.

I didn't understand this one, sorry...

FWIW I filed a GCC bug about the issues with VLAs in the middle of a
struct. I would not, however, expect a quick resolution to this issue,
considering the obscurity of the extension.

Tom