public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "josh at joshtriplett dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/59855] Support sparse-style __attribute__((designated_init)) on structures, requiring designated initializers
Date: Thu, 31 Jul 2014 18:08:00 -0000 [thread overview]
Message-ID: <bug-59855-4-6OAPCuYfNz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59855-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59855
--- Comment #5 from Josh Triplett <josh at joshtriplett dot org> ---
(In reply to Tom Tromey from comment #4)
> Implemented on trunk.
Thanks!
Please consider including anonymous structs and unions in the test case as
well:
struct S {
int a;
union {
int b;
int c;
};
} __attribute__((designated_init));
static struct S s = {
.a = 0,
.b = 0,
};
union U {
int a;
struct {
int b;
int c;
} __attribute__((designated_init));
};
static union U u = {
.b = 0,
.c = 0,
};
Both of the cases above should produce no warnings; analogous positional
initializers should produce warnings.
next prev parent reply other threads:[~2014-07-31 18:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 8:37 [Bug c/59855] New: " josh at joshtriplett dot org
2014-01-20 20:43 ` [Bug c/59855] " tromey at gcc dot gnu.org
2014-01-20 23:01 ` josh at joshtriplett dot org
2014-07-30 15:04 ` tromey at gcc dot gnu.org
2014-07-30 15:06 ` tromey at gcc dot gnu.org
2014-07-31 18:08 ` josh at joshtriplett dot org [this message]
2014-07-31 18:12 ` mpolacek at gcc dot gnu.org
2014-08-02 5:53 ` mpolacek at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-59855-4-6OAPCuYfNz@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).