This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Jan 2014 23:13:13 +0000
- Subject: [Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
- Auto-submitted: auto-generated
- References: <bug-28865-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865
--- Comment #17 from Alan Modra <amodra at gmail dot com> ---
I believe Eric's comment
http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00179.html points at the correct
fix, but it's a bit messy. You need to recursively descend both "decl" and
"init" in code like c-decl.c:finish_decl, updating "decl" component sizes for
any variable length arrays you find, rather than handling just a top level
variable length array as we do currently. Then repeat the exercise for other
language versions of finish_decl..