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

             Bug #: 53548
           Summary: allow flexible array members in unions like
                    zero-length arrays
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: vap...@gentoo.org


gcc will accept this code:
struct {
    short op;
    union {
        int i;
        char foo[0];
    };
};

but rejects this:
struct {
    short op;
    union {
        int i;
        char foo[];
    };
};

with the error:
error: flexible array member in otherwise empty struct

Reply via email to