[Bug c/28865] New: Structures with a flexible arrray member have wrong .size

qrczak at knm dot org dot pl gcc-bugzilla@gcc.gnu.org
Sun Aug 27 21:53:00 GMT 2006


For example this C:
struct {int x; int y[];} obj = {1, {2, 3}};

produces this assembly:

.globl obj
        .data
        .align 4
        .type   obj, @object
        .size   obj, 4
obj:
        .long   1
        .long   2
        .long   3

.size should include the flexible array component.


-- 
           Summary: Structures with a flexible arrray member have wrong
                    .size
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: qrczak at knm dot org dot pl
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865



More information about the Gcc-bugs mailing list