public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53548] New: allow flexible array members in unions like zero-length arrays
@ 2012-06-01  2:13 vapier at gentoo dot org
  2012-06-04  0:50 ` [Bug c/53548] " carlos_odonell at mentor dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: vapier at gentoo dot org @ 2012-06-01  2:13 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: vapier@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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-05-06 18:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-01  2:13 [Bug c/53548] New: allow flexible array members in unions like zero-length arrays vapier at gentoo dot org
2012-06-04  0:50 ` [Bug c/53548] " carlos_odonell at mentor dot com
2024-03-08 20:41 ` kees at outflux dot net
2024-03-08 20:42 ` kees at outflux dot net
2024-03-08 20:50 ` kees at outflux dot net
2024-03-13 19:34 ` qinzhao at gcc dot gnu.org
2024-04-08 18:20 ` qinzhao at gcc dot gnu.org
2024-05-06 18:36 ` cvs-commit at gcc dot gnu.org
2024-05-06 18:36 ` cvs-commit at gcc dot gnu.org
2024-05-06 18:36 ` cvs-commit at gcc dot gnu.org
2024-05-06 18:36 ` cvs-commit at gcc dot gnu.org
2024-05-06 18:40 ` qinzhao at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).