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

           Summary: [4.6 Regression] ObjC errors on structures with
                    flexible data members
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org
                CC: nic...@gcc.gnu.org, ia...@gcc.gnu.org


struct S
{
  int s;
  unsigned char *t[];
};
@interface T
{
  struct S *u;
};
@end
@implementation T
{
};
@end

used to compile just fine in 4.5, but 4.6 rejects this
rh678928.m:14:1: error: instance variable has unknown size

I don't know ObjC enough to say whether this is intentional or not (and whether
ObjC standard actually talks about flexible array members at all).  If flexible
array members should be allowed, then it would just need to make sure the
element type is complete, rather than the array type.

This breaks build of raidem, for original testcase see
http://bugzilla.redhat.com/678928

Reply via email to